combobox blank

D

deb

using access 2003
I have a combobox called ContactID.
I want the row source to contain only records where ContactStatus = active.
If I set the RowSource to show only "Active" in the drop down selections,
and there is a ContactID that has ContactStatus = INactive it will show as a
blank in the ContactID field.

I want the ContactID field to show, but the drop down list to only show
ContactId's that ContactStatus = active
Thanks
 
D

Duane Hookom

Is this a single form view? If so, you could consider modifying the Row
Source SQL to a query that select where status = active or ContactID = the
current contactID value. The code would need to run in the On Current event
of the form.

Dim strSQL as String
strSQL = "SELECT ContactID, ContactName " & _
"FROM tblContacts " & _
"WHERE ContactStatus ='Active' Or ContactID =" & Me.ContactID
Me.ContactID.RowSource = strSQL
 

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