Create a find box using a query

tomtomandy

New member
Local time
Today, 03:51
Joined
May 17, 2017
Messages
1
Hello

I'm reasonably new to using access and am a bit stumped. I have successfully created a 'find record' combo box for a form that is based on one table.

I need to create a new form that is based on a query that has two tables - One for organisation data and one for contact details.

The query links the tables by the organisationID field

When I tried to create the combo box it list the organisations but I can't click on it to select the record. I've attached the query the form is based on.

Help!
 

Attachments

  • Access Query.PNG
    Access Query.PNG
    51.4 KB · Views: 73
You may want to change this to an OUTER join. To see ALL companies,and some contacts.
Your current query will not show a company if there are no contacts.

On the form, put an unbound combo box . The box will show All company names.
When user picks a company ,filter all contacts....
Code:
Sub cboCo_afterupdate()
If IsNull(cboCo) then
    Me.FilterOn=false
Else
   Me.filter = "[company]='" & cboCo & "'"
    Me.FilterOn=true
End if
End sub
 

Users who are viewing this thread

Back
Top Bottom