Jonny45wakey
Member
- Local time
- Today, 16:34
- Joined
- May 4, 2020
- Messages
- 40
Hi
I have a form with a cmd button "Command133" and when the "on-click" event fires for "Command133" i would like codes executed but struggling to nest each statement.
Below is the current code for the "PaymentTerms" field, if this is blank the msgbox appears and then set focus to field, this should be done for each of the following fields in sequence until they are not blank.
1. [me.paymentterms]
2.[me.margin]
3.[me.contactname]
4.[me.contactno]
5.[me.quotedprice]
6.[me.totaljob]
Private Sub Command 133_Click()
If me.paymentterms = "" then
msgbox "Payment Terms is required!",vbCritical,"Mandatory Field"
cancel = true
me.paymentterms.setfocus
End if
Hope this makes sense?
Any help much appreciated
Thanks
Jonny
I have a form with a cmd button "Command133" and when the "on-click" event fires for "Command133" i would like codes executed but struggling to nest each statement.
Below is the current code for the "PaymentTerms" field, if this is blank the msgbox appears and then set focus to field, this should be done for each of the following fields in sequence until they are not blank.
1. [me.paymentterms]
2.[me.margin]
3.[me.contactname]
4.[me.contactno]
5.[me.quotedprice]
6.[me.totaljob]
Private Sub Command 133_Click()
If me.paymentterms = "" then
msgbox "Payment Terms is required!",vbCritical,"Mandatory Field"
cancel = true
me.paymentterms.setfocus
End if
Hope this makes sense?
Any help much appreciated
Thanks
Jonny