B
BonnieW via AccessMonster.com
I have a series of three forms, editing two tables. In the first form, there
is a combo box in which the user selects a place name (where the work was
performed). The user then has two choices (staff effort or volunteer effort)
in button format; they go to different forms.
The place name (combo box) is required in the underlying table, but that
record is not "saved" til about three forms down the road, so we don't hit
an error message til them. Similarly, BeforeUpdate code isn't preventing the
user from moving to the next form, but in case I did something wrong:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me!Combo25) Then
MsgBox "You simply MUST choose a Natural Area! All the cool kids are
doing it."
Cancel = True
Me!Combo25.SetFocus
End If
End Sub
(I've set the DefaultValue for Combo25 to Null).
The combo box doesn't (I think) lose focus- the next logical step after
choosing a place (or not choosing it, as the unfortunate case may be) is to
hit one of the buttons leading to the next form.
How do I get this combobox to require data?
Thanks in advance!
is a combo box in which the user selects a place name (where the work was
performed). The user then has two choices (staff effort or volunteer effort)
in button format; they go to different forms.
The place name (combo box) is required in the underlying table, but that
record is not "saved" til about three forms down the road, so we don't hit
an error message til them. Similarly, BeforeUpdate code isn't preventing the
user from moving to the next form, but in case I did something wrong:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me!Combo25) Then
MsgBox "You simply MUST choose a Natural Area! All the cool kids are
doing it."
Cancel = True
Me!Combo25.SetFocus
End If
End Sub
(I've set the DefaultValue for Combo25 to Null).
The combo box doesn't (I think) lose focus- the next logical step after
choosing a place (or not choosing it, as the unfortunate case may be) is to
hit one of the buttons leading to the next form.
How do I get this combobox to require data?
Thanks in advance!