Hi All,
I have the following code in an onclick event on a form (frmLoadAllocationUN):
If DLookup("LoadBoxNo = " & Forms!frmLoadAllocationUN!cboLoad.Column(0), "qryDrivera", "DriverNo = " & Forms!frmLoadAllocationUN!cboDriverBD1.Column(1)) Then
MsgBox "You have already allocated a load to Load " & Forms!frmLoadAllocationUN!cboLoad.Column(0) & ". Please allocate to another load slot.", vbCritical, "Message from ZP"
Else
MsgBox "Test OK"
End If
It fails to work & i don't understand why! Am i missing something in the first line?
I have the following code in an onclick event on a form (frmLoadAllocationUN):
If DLookup("LoadBoxNo = " & Forms!frmLoadAllocationUN!cboLoad.Column(0), "qryDrivera", "DriverNo = " & Forms!frmLoadAllocationUN!cboDriverBD1.Column(1)) Then
MsgBox "You have already allocated a load to Load " & Forms!frmLoadAllocationUN!cboLoad.Column(0) & ". Please allocate to another load slot.", vbCritical, "Message from ZP"
Else
MsgBox "Test OK"
End If
It fails to work & i don't understand why! Am i missing something in the first line?