Hi,
This is my first time posting and I'm fairly new to Access and VBA. I'm working on a simple after update function and I can't get the dlookup to work with a date field that its taking from a form. Here's my code so far:
Code:
Private Sub txtCDate_AfterUpdate()
If IsNull(DLookup([cheque_date], "Cheque_Details", "[Cheque_Date] =" & Forms![PAS].[txtCDate])) Then
With DoCmd
.SetWarnings False
.OpenQuery (qryEmployeeInfo)
.SetWarnings True
End With
Else
With DoCmd
.SetWarnings False
.OpenQuery (qryChequeDetails)
.SetWarnings True
End With
End If
End Sub
It might have something to do with the format that I have my date in as it's in dd/mm/yyyy format and not standard US date format, but that's the format it needs to be in for storage in my database.
Any advice anyone may have would be great
Thanks,
Jahyd