D
Design by Sue
My code is
If DLookup("Mechanic", "PartSuffixTbl", "Mechanic = " &
CLng(MechanicList.Column(0)) & "") = MechanicList.Value Then
MechanicList.SetFocus
MechanicBox.Value = ""
MessageBox = "This Mechanic cannot be modified because"
MessageBox2 = "there are Wheels assigned to it"
Me.refresh
This is to look in the Mechanic column of PartSuffixTbl and if the
MechanicList.Value is found, the following code takes place. I have and else
also but the problem is with the DLookup so I'm not posting that.
CLng(MechanicList.Column(0) returns the value correctly and so does
MechanicList.Value. But instead of running the code in the Then statement,
it is skipping to the Else statement. It is as if the code is not looking in
the table. Can anyone tell me what I am not seeing in this?
Thanks in advance.
Sue
If DLookup("Mechanic", "PartSuffixTbl", "Mechanic = " &
CLng(MechanicList.Column(0)) & "") = MechanicList.Value Then
MechanicList.SetFocus
MechanicBox.Value = ""
MessageBox = "This Mechanic cannot be modified because"
MessageBox2 = "there are Wheels assigned to it"
Me.refresh
This is to look in the Mechanic column of PartSuffixTbl and if the
MechanicList.Value is found, the following code takes place. I have and else
also but the problem is with the DLookup so I'm not posting that.
CLng(MechanicList.Column(0) returns the value correctly and so does
MechanicList.Value. But instead of running the code in the Then statement,
it is skipping to the Else statement. It is as if the code is not looking in
the table. Can anyone tell me what I am not seeing in this?
Thanks in advance.
Sue