question on Combobox

S

SF

Hi,

I have 4 comboboxes for Province, District, Commune and Village. I am able
to set an cascade update to filter the desire data based from selection on
different combos. I observed that some time user click dirrectly on district
conbobox without selecting province. I want to display a message notifying
user that they have to select a province first before proceeding to district
level.

What event should I use to check if province combo box is empty and kick the
msgbox to start?

SF
 
D

Dirk Goldgar

SF said:
Hi,

I have 4 comboboxes for Province, District, Commune and Village. I am
able to set an cascade update to filter the desire data based from
selection on different combos. I observed that some time user click
dirrectly on district conbobox without selecting province. I want to
display a message notifying user that they have to select a province
first before proceeding to district level.

What event should I use to check if province combo box is empty and
kick the msgbox to start?

You could use the Enter or GotFocus event. Something like ...

Private Sub District_Enter()

If IsNull(Me!Province) Then
MsgBox "Please select a province first."
Me!Province.SetFocus
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top