updating access query - Geeks to Go Forums

Jump to content

Log in Register Register Malware removal guide How it works

updating access query how can I start query by command

#1 djames

  • Group: Member
  • Posts: 3
  • Joined: 02-March 05

Posted 02 March 2005 - 10:16 AM

have a form with 2 combo boxes, the first is company name, the second is contact name. When the company name is entered a query limits the contact names to that company This works fine until the operator goes back and changes the company name or goes on to a new record the contact field never updates and the original list never changes. I'm not sure if I need VBA code or if there is another solution. Any input is appreciated.

#2 nanook

  • Group: Member
  • Posts: 13
  • Joined: 05-March 05

Posted 07 March 2005 - 09:52 PM

Is there a reason that the contact name is also a combo box? Could you change the contact to just a text box whose control source is coming from the first combo box (company name)? Just a thought...

#3 djames

  • Group: Member
  • Posts: 3
  • Joined: 02-March 05

Posted 08 March 2005 - 07:45 AM

Thank you for your input, let me further explain the application and then it may make sense or you may have a better idea.
There are 3 tables involved (I tried to limit the repeative entry required).
1. company table which contains corporation names (ie General Motors, Ford Motor Company, ...) and addresses
2. plant table which contains plant name (ie city xxx assembly plant, city yyy plastics plant, ...) and address, [each plant is tied to a corporation]
3. contact table which contains name, phone, mobile, fax, email [each contact is tied to either a corporation or a plant].
The request for quote form has a 4 combo boxes "Corporation", "Plant", "Attention to" and "Requested by".
What I tried to do is limit the choices in the "Attention to" combo box based on the Corporation selected, and the "Requested by" combo box based on the plant selected. I used a query and it works the first time but if you change the corporation or the plant selection the contact list still show as the original list, the query does run or update. This is also true if you complete the form and enter a new request for quote without closing the form. The only time it works is if you close the form.
Ultimately this with other information will be dumped to a boiler plate quote letter which is a word document. Hope you can understand the intent, I have worked with Visual Basic 6 and now just starting with Access 2000 any help will be appreciated.

Share this topic: