Good Day,
I am trying to access a value in a table using VBA DLookup code. However I am unsuccessful.
Can anyone please advise what is wrong with my code. I am sure the table exist and the field of reference exist also.
Here is the code that I am using:
The error message says it cannot find the input table or the query "RecBookNum"
[ICODE]
Private Sub Post_Deposit_Click()
Dim Y As Integer
Y = DLookup("ReceiptBook", "RecBookNum", "OrderID ='" & Me.[Order ID] & "'")
MsgBox Y
End Sub
[/ICODE]