L
LisaInAz
Team Thank you in advance for helping me with my problem.
I have used this forum to build a form to use as a switchboard for
customers.
In the forms OnLoad event,
I want to compare a date and time field I have entered on a table against
Now() to see if the customer can still access the "switchboard"
I have a form called frmDates where I can add the "Stop" info I would like
to add a input/edit mask to the stop field so that it is correct. example of
data that would be entered in form 12/27/2009 5:00:00 PM
Table is called tblDates containing
StartDate (date/time format)
StopDate (date/time format)
CurrentMonth (yes/no format)
Stop (date/time format)
the field "Stop" set as a Date/Time format no input mask set for field
I tried spliting the Date and Time into separate fields but the logic I had
didn't seem to work everytime
<Date()>=DLookUp("[StopDate]","TblDates","[CurrentMth]=True") And
Time()>=DLookUp("[StopTime]","TblDates","[CurrentMth]=True")>
I thought I read something stating that Now() shouldn't be used but this is
the only way I can seem to get "restricting access" to the switchboard to
work.
I have tried different input mask such as 99/99/0000 99:00:00\ >LL;;_
but I keep getting an error stating that the size is to big or not correct
I am pretty sure I have two problems going on but any suggestions or help
would be great...
I have used this forum to build a form to use as a switchboard for
customers.
In the forms OnLoad event,
I want to compare a date and time field I have entered on a table against
Now() to see if the customer can still access the "switchboard"
I have a form called frmDates where I can add the "Stop" info I would like
to add a input/edit mask to the stop field so that it is correct. example of
data that would be entered in form 12/27/2009 5:00:00 PM
Table is called tblDates containing
StartDate (date/time format)
StopDate (date/time format)
CurrentMonth (yes/no format)
Stop (date/time format)
the field "Stop" set as a Date/Time format no input mask set for field
I tried spliting the Date and Time into separate fields but the logic I had
didn't seem to work everytime
<Date()>=DLookUp("[StopDate]","TblDates","[CurrentMth]=True") And
Time()>=DLookUp("[StopTime]","TblDates","[CurrentMth]=True")>
I thought I read something stating that Now() shouldn't be used but this is
the only way I can seem to get "restricting access" to the switchboard to
work.
I have tried different input mask such as 99/99/0000 99:00:00\ >LL;;_
but I keep getting an error stating that the size is to big or not correct
I am pretty sure I have two problems going on but any suggestions or help
would be great...