Mackbear
Registered User.
- Local time
- Yesterday, 21:51
- Joined
- Apr 2, 2019
- Messages
- 168
Hello, starting another thread again, thank you everyone for your patience on a beginner like me I really appreciate it. so I need to be able to make sure that there will be no required fields that will be left blank. I attached an image of how it looks like.
* Ext date, InVoice count, LF Assessed, waiver approved, request method should not be blank.
* If the waiver is approved "Yes", the credit amount, credit method and exp date to credit should not be blank.
* If the waiver is "No" the declined reason should not be blank.
Here's my code:
If IsNull(Me.extdatevreachout) Or IsNull(Me.lfassessedvreachout) Or IsNull(waiverapprv) Or IsNull(reqmethod) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
If Me.waiverapprv = "Yes" And IsNull(Me.creditamnt) And IsNull(Me.creditmethod) And IsNull(expinvdatecredit) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
ElseIf Me.waiverapprv = "No" And IsNull(Me.declinedreason) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
Else
"Some action"
End if
Thank you!
* Ext date, InVoice count, LF Assessed, waiver approved, request method should not be blank.
* If the waiver is approved "Yes", the credit amount, credit method and exp date to credit should not be blank.
* If the waiver is "No" the declined reason should not be blank.
Here's my code:
If IsNull(Me.extdatevreachout) Or IsNull(Me.lfassessedvreachout) Or IsNull(waiverapprv) Or IsNull(reqmethod) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
If Me.waiverapprv = "Yes" And IsNull(Me.creditamnt) And IsNull(Me.creditmethod) And IsNull(expinvdatecredit) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
ElseIf Me.waiverapprv = "No" And IsNull(Me.declinedreason) Then
MsgBox "Please check empty fields", _
vbCritical, _
"Canceling Update"
Me.extdatevreachout.SetFocus
Cancel = True
Else
"Some action"
End if
Thank you!