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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter records in linked table based on numeric value 1

Status
Not open for further replies.

taterease

MIS
Jun 19, 2003
23
US
I've created a table (tbl_Constituents) that allows a user to enter the number of "guests" that a constituent is bringing to an event. (The minimum is 1, there is no maximum although it should never be more than 10).

In a related table (tbl_Bidder_nbrs) there are two fields - the Constituent_id number (related back to tbl_Constituents) and a numeric field Bidder_Nbr. What I need to do is have a query that will enter a record in tbl_Bidder_nbrs for each "guest" from a query.

I.E., if a Constituent has three "guests" and has a Constituent id of 0001 when the query is run the tbl_Bidder_nbrs would have three records:

Constituent_id Bidder_Nbr

0001 1
0001 2
0001 3

I've searched the FAQ's and haven't found anything that I can manipulate to do this chore - probably I'm not looking in the right spot. Any help appreciated!

Thanks.

Jim
 
You don't really need a query to do this job.

Create a form based on your main table (tbl_Constituents).
Add a combobox to the form using the wizard and let its primary field be the Constituent_id.
Add a sub form based on your tbl_Bidder_nbrs to your main form using the wizard and declare the master and child fields for the form to be the Constituent_id field.

When you run the form you will be able to select the constituent id, the sub form will change to the records belonging to the selected Constituent id and you can enter the data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top