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

Easy Access Questions

Status
Not open for further replies.

StephHansen

Programmer
Dec 26, 2001
87
IN
Obviously my skills are failing me right now...

I have three tables Members_T, Clients_T, Activity_T and 2 Queries Members_Activity_Q and Clients_Activity_Q


The Members and Clients table store generic info, name, address, etc. The Members table also has Number of Points as a column. All tables have their primary key as an autonumber. The primary key foreigh keys are Member_ID, Client_ID, and Activity_ID.

That being said, I need to generate details in the activity table (via a form), referencing the members and clients. I created two combo boxes that look up the client name and the member name. I want to then populate other fields in this form (Member_ID, Member_Phone, client_ID, etc) based on what the user selects.

i know this is simple but I am just drawing a blank. Thanks in advance. Stephanie Nicholas
Software Engineer
i-Net Strategy
 
So your Members_T and Clients_T are essentially the same table formats (except the extra Points field in Members_T)?

Possibilities:
1) Combine both tables into one with an extra Type field to diferentiate. Then your form becomes really simple. You just filter your form on the Type field. You could still have two comboboxes, just use the Type field in their sql based rowsource.

2) In the After_Update event of the combo boxes put in some code to change the form's 'record source' and each of the form's controls' 'control source' to point to the appropriate table based on which combobox was used, then refresh/requery

3) Open a recordset in code, seek the appropriate record based on the combobox, then 'push' the values into the appropriate controls on the form. Assuming you want the user to be able update them, not just display the values, then you'll also have to put code in to collect all the values of the controls and update the table with that.

Let me know if you need more specific help with one of these...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top