textbox changes date at 07:00 AM not 12:00 AM

Shafique

Board Regular
Joined
Nov 23, 2018
Messages
119
Hello Everyone.....
in our unit we changes worker shift at 07:00 AM and 07:00 PM. the DAY SHIFT is from 07:00 AM to 07:00 PM, and NIGHT SHIFT is 07:00 PM to 07:00 AM. In production form i set a textbox named PRDATE and a combo box named SHIFT that fill the textbox value with its last saved value looking table's max ID using
PRDATE.Value = DLookup("PRDATE", "MDFPRD", "ID = " & DMax("ID", "MDFPRD", "ID < " & Me.ID))
SHIFT.Value = DLookup("SHIFT", "MDFPRD", "ID = " & DMax("ID", "MDFPRD", "ID < " & Me.ID)) it works great.
here is want the PRDATE value change automatically at 07:00 am with current date and SHIFT value change into DAY
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Never used it myself, but look at the timer event of your form, with perhaps a 5 minute interval.
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,615
Members
449,460
Latest member
jgharbawi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top