master/detail with two different data sets

E

Eric

I have a table that has the active row displaying, I also have an archive
table that stores all of the changes that were made to the that particular
row. The relationship is in the master table I have an ID which is a primary
key, and the archive table I have a parentID key that is repeating.

How in infopath could I do a query on the main table, and in a repeating
table show all of the archived rows from the archive table where the
parentID=id?

Thanks,
Eric
 
J

JerryTh [MSFT]

This is very doable!

Open the properties on Table1 and go to the Master / Detail tab.
Select "Set as Master" and enter an ID ('Master1').

Open the properties on Archive Table and go to theMaster / Detail tab.
Select "Set as Detail" and then set the 'Link to...' = 'Master1'.
In the Master/Detail Relationship section, select 'By key field' and then
select the 2 fields that are the 'link' between the 2 tables.

Now whatever row is selected in Table1, the corresponding row(s) will show
in Table2!
 
E

Eric

It seems like it would work, but when I take the Master data, and drag it
there, well I will get to that in a second. I acutally need it to be
'backwards', I need the master data to be showing in a repeating section
format, and the history showing up in a table format.

Even that does not work however.

I have two different datasets, the first one is the Main dataset (the data
to that can be submitted), I also have a second dataset called archive.
When I drag the Main dataset in, I choose repeating table. I then go into
the properties of the repeating table and choose ID as the master.

In the second column in the form I drag in the archive dataset, and choose
repeating section, I then click on the properties, and click on
Master/Detail tab and everything is greyed out. It actually does not matter
what I choose, either repeating section or repeating table, the
Master/Detail tab, everything is greyed out.

Please explain what I would be doing incorrectly.
 
J

JerryTh [MSFT]

I put together a quick little sample.
If you would like to take a look at it, tyou can ciompare to what you are
doing and see what might be happening.
Send me your address privately and I will fwd it to you.

(Broken up so web crawlers don.t see it)
microsoft.com
jerryth@
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
Do not send email to this alias. It is for newsgroup only
 

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