G
graeme34 via AccessMonster.com
Hi I am getting a data type mismatch message for the following criteria on
the dlookup function.
If IsNull(DLookup("[SalesOrderNumber]", "tblSalesOrderLine", _
"[SalesOrderNumber] = ' " & Me!txtSalesOrderNumber & " ' ")) Then
MsgBox "Sorry you cannot save this Order " _
& "at this time as there are no order details entered" _
, vbOKOnly, "NO DETAILS ENTERED"
Exit Sub
End If
Both fields are of type long integer, I can only assume it is a syntax error
on the first part of the criteria as during the debugging the second part Me!
txt etc is showing a value of 6, the value on the order form.
What I am trying to do is stop users closing the order form if the subform
(order details) is empty.
the dlookup function.
If IsNull(DLookup("[SalesOrderNumber]", "tblSalesOrderLine", _
"[SalesOrderNumber] = ' " & Me!txtSalesOrderNumber & " ' ")) Then
MsgBox "Sorry you cannot save this Order " _
& "at this time as there are no order details entered" _
, vbOKOnly, "NO DETAILS ENTERED"
Exit Sub
End If
Both fields are of type long integer, I can only assume it is a syntax error
on the first part of the criteria as during the debugging the second part Me!
txt etc is showing a value of 6, the value on the order form.
What I am trying to do is stop users closing the order form if the subform
(order details) is empty.