A
AccessUser777 via OfficeKB.com
Hi all,
New to VBA, so forgive my ignorace.
I have the following:
user form
combo box: cmbYESNO
text field: txtIFNOWHY
What I'm trying to accomplish is making sure that the user doens't forget to
populate the cmbYESNO and depending on the value of this combo box, whether
or not txtIFNOWHY needs to be filled out. I have the following code which i
picked up from a differnt thread on this site, which works for ensuring that
the cmbYESNO is filled out, but i can't seem to get the second part of the
code. Any help is appreciated. Thanks
Here is my code:
If Trim(Me.cmbYESNO.Value) = "" Then
Me.cmbYESNO.SetFocus
MsgBox "PLEASE INDICATE IF REVERSAL WAS SAVED"
If Trim(Me.cmbYESNO.Value) = "NO" Then
Me.txtIFNOWHY.SetFocus
If Trim(txtIFNOWHY.Value) = "" Then
MsgBox "PLEASE ENTER REASON REVERSAL WAS NOT SAVED"
Exit Sub
New to VBA, so forgive my ignorace.
I have the following:
user form
combo box: cmbYESNO
text field: txtIFNOWHY
What I'm trying to accomplish is making sure that the user doens't forget to
populate the cmbYESNO and depending on the value of this combo box, whether
or not txtIFNOWHY needs to be filled out. I have the following code which i
picked up from a differnt thread on this site, which works for ensuring that
the cmbYESNO is filled out, but i can't seem to get the second part of the
code. Any help is appreciated. Thanks
Here is my code:
If Trim(Me.cmbYESNO.Value) = "" Then
Me.cmbYESNO.SetFocus
MsgBox "PLEASE INDICATE IF REVERSAL WAS SAVED"
If Trim(Me.cmbYESNO.Value) = "NO" Then
Me.txtIFNOWHY.SetFocus
If Trim(txtIFNOWHY.Value) = "" Then
MsgBox "PLEASE ENTER REASON REVERSAL WAS NOT SAVED"
Exit Sub