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

Getting fielddata based on previous fields data

Status
Not open for further replies.

Claulle

Technical User
May 22, 2003
37
DK
Hi there :)

I have 3 tables:

Table 1: Table 2: Table 3:
ID Type ID Doc ID Prod
------------- ------------ ------------
1 Doc 1 Doc1 1 Prod1
2 Prod 2 Doc2 2 Prod2
3 Doc3 3 Prod3

Table 4:
ID Type Subject
---------------------

In table 4 Im using table 2 to get the 'type' and regarding of what type im choosing, in 'subject' i need to get the data from either Table2 OR Table3. Both 'Type' and 'Subject' should be comboboxes.

I need table4 to store the data in.

Hope anyone can help me. thx alot :)

- Claus




 
can you be a little more specific? when you say type and subject should be combo boxes are you talking about on a form? What aout ID in table 4, is that autonumber or is it coming from one of the other tables? Why isn't the type coming from your table 1 type field? And if you are getting subject from either table2 or table3, which one takes priority if values are selected in both combo boxes? I'd be better to write down some data and give an example of the desired output.

Durible Outer Casing to Prevent Fall-Apart
 

Table 1: Table 2: Table 3:

ID Doc ID Item ID Type
-------- -------- --------
1 doc1 1 Item1 1 documents
2 doc2 2 Item2 2 Items
3 doc3 3 Item3
4 doc4 4 Item4
5 doc5 5 Item5
. .
. .
. .

Lets assume we have a form with a field (dropdownmenu) where the menuitmes is gotten from table 3. (so
we can choose from 'documents' and 'Items')
Next field would also be a dropdownmenu. If we in the previous field choose 'Documents' the new dropdownmenu
will contain data from Table 1. Or if we had choosen 'Items' the dropdownmenu will caontain data from Table2.

Table 4 is made to contain the choosen data so there will be a
ID(primary key,autonumber)
Type (dropdownmenu getting data from Table3)
Ref (Dropdownmenu getting data from table1 or table2 regarding what we put in the Type-field)

Hope this will clarify my question. Thx for the help!

- Claus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top