I have have two forms - frmLogBatch and frmCloseBatch. The user enters a DateReceived on the form frmLogBatch and then later enters a DateClosed on the frmCloseBatch. I have a command button on the frmLogBatch which launches the frmCloseBatch and links the two forms via the Control# field (primary key in both underlying tables). What I'm trying to do is write code which prevents users from enterring a DateClosed which preceeds the DateReceieved. Here's what I put in the frmClosed Before Update event property:
If DateClosed < DLookUp ("[DateReceived]","LogBatch","[Control#]="&[Forms]![frmLogBatch]![[Control#]) Then
.......
The error message I'm getting is "Data Type Mismatch". I don't understand why, since both fields are a date/time data type.
Can anyone help.....
Thanks - Fran
If DateClosed < DLookUp ("[DateReceived]","LogBatch","[Control#]="&[Forms]![frmLogBatch]![[Control#]) Then
.......
The error message I'm getting is "Data Type Mismatch". I don't understand why, since both fields are a date/time data type.
Can anyone help.....
Thanks - Fran