no data in combo box

  • Thread starter Thread starter chriske911
  • Start date Start date
C

chriske911

I use a combo box after update event to call another form holding the
record with that same data
but how can I immediately show a "NO DATA" form if the combo box
recordsource holds no values?
for a report you could use the no data event but how can I trigger this
for a combo box?

thnx
 
You don't, you set limit to list to 'yes' in the data properties of the
combobox, the you can use the Not In List event to pickup new entries. And
then you can use the after_update event to check that there is a valid
selection being made from the combobox before you even atempt to oopen the
form eg;

If Not Isnull(me.cboMyCombBox) Then
docmd.Openform etc etc
Else: msgbox "You must select from the list to continue"
End If

TonyT..
 
chriske911 said:
I use a combo box after update event to call another form holding the
record with that same data
but how can I immediately show a "NO DATA" form if the combo box
recordsource holds no values?
for a report you could use the no data event but how can I trigger this
for a combo box?


You can check the combo box's ListCount property to see if
the list is empty.
 
In your combobox afterupdate event, check the recordsource.recordcount
property. If it is = 0, then display your message or whatever. HTH.
 
chriske911 expressed precisely :
I use a combo box after update event to call another form holding the record
with that same data
but how can I immediately show a "NO DATA" form if the combo box recordsource
holds no values?
for a report you could use the no data event but how can I trigger this for a
combo box?

addendum:
I want to show a "NO DATA" if the combo box list is empty instead of
showing the form holding that combo box
I don't want to show that "NO DATA" form instead of the form I would
call using the after update event of the combo box
if you know what I mean

grtz
 

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

Similar Threads


Back
Top