Perhaps it would be better if I described the exact scenario. I am creating
an inventory database. Each ProductID can have a number of licenses.
ProductsTable has the fields ProductID, Manufacturer, Version, #ofLicenses,
etc.
LicensesTable has the fields ProductID, Licenses, ExpDate, Staff, etc.
So I created a form with ProductsTable fields in the form header and
LicensesTable fields embedded as a subform in the detail section. Here are
the things I'd like my database to do:
1. If I enter, say "3" in the #ofLicenses field, I'd like for the
LicensesTable to only accept 3 records. Thus, the LicensesTable can only have
the number of records entered in the #ofLicenses field in the ProductsTable.
2. When I click the next record at the very bottom, I'd like for
LicensesTable in the detail section to "go with" the ProductsTable. The
problem I have now is, LicensesTable data stays when the ProductsTable is
clicked to go to the next record.
The relationship of the ProductID field between the ProductsTable and the
LicensesTable is one-to-many.
I couldn't get the right connection so that the records in the License form
stays with its ProductID when I click the form to add a new record.
I hope I was able to give a better description of my problem. Your help is
VEYR MUCH appreciated!
Jeff Boyce said:
First, what kind of data does table2 hold? That's an indirect way of asking
why you need the ProductID from table1 to show up in table2. To put a
sharper point on it, what is the relationship between the records in table1
and the records in table2?
FYI, if you are using an Access Autonumber for [ProductID] in table1, you
will NOT be able to use an Access Autonumber for the 'matching' field in
table2.
Regards
Jeff Boyce
Microsoft Office/Access MVP
DCSC said:
I have 2 tables. Table 1 has ProductID as primary key. I want the same
ProductID field to appear on Table 2. When data is entered/added in Table
1,
how would that same data automatically show in Table 2?
I am new to Access so I hope I made sense. Thanks to all those who can
help
me!