Andy_CD
Bumbling Idiot
- Local time
- Today, 12:10
- Joined
- Feb 6, 2017
- Messages
- 23
Hi,
I am trying to set an if statement to prevent someone from printing a label unless they have enter all the correct information, under certain conditions. So my statement below works when the condition is enabled, but it makes no difference if they enter data into the two other fields or not.
What I want to happen is if they put data in both fields for it to carry on to the printing code. Currently if me.drug.column(1)= 1 then it always goes to ULM.
If Me.Drug.Column(1) = 1 And Me.Batch_Number Or Me.Manufacturer Is Null Then GoTo ULM
ULM: MsgBox "Please enter Batch Number and Manufacturer before proceeding", vbOKOnly + vbExclamation, "Unlicensed Medicine"
End
I am trying to set an if statement to prevent someone from printing a label unless they have enter all the correct information, under certain conditions. So my statement below works when the condition is enabled, but it makes no difference if they enter data into the two other fields or not.
What I want to happen is if they put data in both fields for it to carry on to the printing code. Currently if me.drug.column(1)= 1 then it always goes to ULM.
If Me.Drug.Column(1) = 1 And Me.Batch_Number Or Me.Manufacturer Is Null Then GoTo ULM
ULM: MsgBox "Please enter Batch Number and Manufacturer before proceeding", vbOKOnly + vbExclamation, "Unlicensed Medicine"
End