Can this be done?

L

Linda

I have linked two tables to sql server database
the key field on table1 is "tab1key1" + "tab1key2"
+ "tab1key3"

key field on table2 is "tab2key1" + "tab2key2"
+ "tab2key3"

these "tab1key2" from table1 maps to "tab2key1" in table2

When I bring up a record in form1, Is it possible
to link it to records in form2 with table2?

For eg. Table 1 values are = A+AA01+999
B+AA01+298
C+AA01+999

Table 2 values are = AA01+XYZ+001
= AA01+XYZ+002
= AA01+ABC+003
= BA01+XYA+001

etc...

If I bring up a form for value = say A+AA01+999 from
table1
I should be able to click on a button and bring up
another form with data from table2 that will show
AA01+XYZ+001
AA01+XYZ+002
AA01+ABC+003

Thank you,
Linda
 
J

John Smith

Personally I would put table2 on a sub-form, the Parent/Child properties will
then do what you want, and you can always put it on a tab control if you are
short of space on the form.

If you do want to open another form, use the where condition clause of OpenForm
to restrict the records :-

DoCmd.OpenForm formname[, view][, filtername][, wherecondition][, datamode][,
windowmode][, openargs]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top