Good Day all,
by pressing a button on a form, I want to load a mainform with its subform given the following statement:
Code:
doCmd.OpenForm "frmSigninSupervisor", acNormal, , "DateValue(tblSignin.[DateCreated])=# " & Me.Text56 & "#"
but an error message pops up as follow: Data type mismatched in criteria expression.
However pressing another button on another form in a similar situation works fine. Here is the code:
Code:
DoCmd.OpenReport "tblsignin", acViewReport, , "Datevalue([Auto Date]) =# " & Me.Text6 & "#"
These codes looks similar so I would be very grateful if anyone can explain the reason for the error message and show how to overcome.