Combo in Main Form to Search Subform

Weekleyba

Registered User.
Local time
Today, 07:12
Joined
Oct 10, 2013
Messages
593
I want to search for all Projects by using a combo box on the main form.
See attached sample database.
I just not sure how this is done.
I'm not a VBA user but, I'm pretty sure there has to be some code put in the AfterUpdate event of the combo box.
Can anyone give me a hand with that?
Thanks!
 

Attachments

Your form is based on the reservation table, and the reservation search appears to work already. What would you expect the project search to do? Did you mean to put that search box on the project subform?
 
I would like to search for any Project with the combo box.
I don’t think it will work in the subform since it will only search for the projects under that particular Reservation. I want to have a combo to search for all Projects.
If I can make that work, I want to do the same with Contracts.
Does that make sense?
Thanks for looking at this.
 
Please explain why you have chosen to bind the main form to the reservation table.
You've actually turned it upside down. Either you must have the main form attached to the project table or it must be unbound.
Please explain how and where you want the results shown when searching for all projects.
 
JHB,
I am definitely no expert in Access but just trying to build a db for another department as a side project. So I appreciate your help.
No specific reason for binding the reservation table to the main form other than it works for selecting the reservation. When I decided add a search for Projects then I ran into trouble. Perhaps the way I've set it up so far will not allow other searches, i.e. Projects and Contracts.
If I change the main form to unbound, how do I get the searches to work?
When searching for all projects, I was simply wanting a drop down list that I could select from and by clicking it, it would display the project info on the form that is open on the first tab.
One of the things that gave me heartburn was the many-to-many relationship I need between Projects and Contracts. Hopefully that doesn't hinder the ability to create searches for Reservations, Projects, and/or Contracts.
Thanks again for your help and patience with my little Access knowledge.
 

Users who are viewing this thread

Back
Top Bottom