Researcher
I.T. Veteran
- Local time
- Today, 13:14
- Joined
- Oct 11, 2006
- Messages
- 42
Hello,
I am new to VBA and would like to ask for some help on coding in my database. I am attempting to enter four time entries; Time Printed, Time TIC, Time Processed, and Time PUFC into a table.
What I am having a problem with is when the user enters data into these fields, I need for them to enter times based on the 24 hour clock and would like to have some form of validation to control what they enter. Currently, when they enter times after midnight, the validation no longer works. I also need for them to enter these time sequentially so that my other caluculations work properly.
(Calculations that determine how many minutes there are between these entries, i.e - say Time Printed - Time PUFC). Could someone suggest the best way to setup this scenario.
Below is the validation code I am currently trying to use:
if time tic.value <= time printed.value then
msgbox ("Time TIC is not valid!")
Cancel=True
end if
The validation seems to work until times after midnight are entered, here is the error:

Any help would be appreciated...
Thank You..
I am new to VBA and would like to ask for some help on coding in my database. I am attempting to enter four time entries; Time Printed, Time TIC, Time Processed, and Time PUFC into a table.
What I am having a problem with is when the user enters data into these fields, I need for them to enter times based on the 24 hour clock and would like to have some form of validation to control what they enter. Currently, when they enter times after midnight, the validation no longer works. I also need for them to enter these time sequentially so that my other caluculations work properly.
(Calculations that determine how many minutes there are between these entries, i.e - say Time Printed - Time PUFC). Could someone suggest the best way to setup this scenario.
Below is the validation code I am currently trying to use:
if time tic.value <= time printed.value then
msgbox ("Time TIC is not valid!")
Cancel=True
end if
The validation seems to work until times after midnight are entered, here is the error:

Any help would be appreciated...
Thank You..