D
Devon
Good morning
I am attempting to use vbYesNo within an If/Then statement to populate a
separate field. Essentially, one of the fields on a Main form will be either
Unlimited, or have some sort of limit. If there is a limit, I am trying to
have on BeforeUpdate in a subform to give a pop-up vbYesNo box to give the
user a warning that the field from the Main Form has a limt, and to have them
acknowledge reading this warning. I would like it to be if the user chooses
Yes, then a field on the subform named Acknowledgement becomes Yes, if they
choose No, then they will not be able to proceed any further.
Below is what I have created thus far. I have found similar examples within
this forum, but not that use the Boolean logic I need. I get the vbYesNo box
with all the correct dialogue, however, regardless of choosing Yes or No, the
Acknowledgement box turns to Yes.
Help would be appreciated.
Thanks
If ([Forms]![Main_Form].[Field1]) <> "Unlimited" Then
MsgBox "Warning to the user Dialogue...", vbYesNo
If vbYes Then
Me.Acknowledgement = "Yes"
Else
Me.Acknowledgement = "No"
MsgBox "You are not allowed to proceed."
End If
End If
I am attempting to use vbYesNo within an If/Then statement to populate a
separate field. Essentially, one of the fields on a Main form will be either
Unlimited, or have some sort of limit. If there is a limit, I am trying to
have on BeforeUpdate in a subform to give a pop-up vbYesNo box to give the
user a warning that the field from the Main Form has a limt, and to have them
acknowledge reading this warning. I would like it to be if the user chooses
Yes, then a field on the subform named Acknowledgement becomes Yes, if they
choose No, then they will not be able to proceed any further.
Below is what I have created thus far. I have found similar examples within
this forum, but not that use the Boolean logic I need. I get the vbYesNo box
with all the correct dialogue, however, regardless of choosing Yes or No, the
Acknowledgement box turns to Yes.
Help would be appreciated.
Thanks
If ([Forms]![Main_Form].[Field1]) <> "Unlimited" Then
MsgBox "Warning to the user Dialogue...", vbYesNo
If vbYes Then
Me.Acknowledgement = "Yes"
Else
Me.Acknowledgement = "No"
MsgBox "You are not allowed to proceed."
End If
End If