Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate underlying table using Combo Boxes (Access 2003) 2

Status
Not open for further replies.

Dausa67

Technical User
Oct 1, 2008
96
US
Good Morning,

Summary of what I want to achieve: From my main form I would like three combo boxes to auto populate my main data table.

Database Details: I am using one form and two tables
[li]Cage_Code_tbl[/li] is used only for the purpose of auto populating three combo boxes on my form.
[li]PBOM_tbl[/li] is my main table where I want all my data to be stored from the form.

Additional Details:
[li]I fill in the first combo box with a Cage Code number, then the other two combo boxes will fill in the vendor name and status.[/li]

Details of what I want to achieve:
[tab]Fill in Cage Code number in first combo box (achieved)
[tab][tab]Status and Vendor Name auto fill based on my entry of cage code (achieved)

[tab][tab][tab]Save data to PBOM_tbl. FAIL

Thank you in advance for helping me. Hopefully I explained this in a way that it makes sense.

Clay
 

1. Create an append query, appending fields to the PBOM_tbl.
2. The value(s) you want to put in your table will be:
Forms!frmYourMainForm.YourComboBox[/code]
3. Activate the query from a button on the form.


Randy
 
We don't have a clue where Vendor Name and Status come from? Are these fields in Cage_Code_tbl associated with a unique Cage Code?

What is "FAIL"? Is this a field in the PBOM_tbl?

Duane
Hook'D on Access
MS Access MVP
 
Yes, Vendor name and Status come from the Cage_Code_tbl and are associated with a unique Cage Code.

No "FAIL" is not a field. It means that I have not achieved this last step.

Clay
 
There should be no need for "the other two combo boxes".

The Row Source of the first combo box should be:
Code:
SELECT [Cage Code], [Vendor Name], [Status]
FROM Cage_Code_tbl
ORDER BY [Cage Code];
Make sure the combo box column count is 3 and bound column is 1. Then use two "text boxes" with control sources of:
Code:
  =cboCageCode.Column(1)
Code:
  =cboCageCode.Column(2)
I still don't understand what you want to achieve.

Duane
Hook'D on Access
MS Access MVP
 
After the three combo boxes have the data in them, I want to save the record (on the form) and I want the new data to save on the PBOM_tbl.

Clay
 
Is your form bound to PBOM_tbl ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks everyone for your help. I got it.

Clay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top