Form/subform; parent/child; from same table

G

Guest

I am creating a database with constraints placed by a national entity. There
are several fields which have a parent/child relationship but are required to
be in the same table. Is it possible to use form/subform to collect the data
which will reposit in the same table; or does the use of form/subform mandate
that two tables be used?
Tx
Rocky
 
A

Allen Browne

You can use a subform to show related children from the same table.

For example, the Employees table in the Northwind database could have a
ReportsTo field, that contains the name of the employee that this person
reports to. You could then use a subform to show the people who report to
the employee in the main form. You would set the subform's LinkMasterFields
property to EmployeeID, and the LinkChildFields property to ReportsTo.
 
R

Rick Brandt

Rocky said:
I am creating a database with constraints placed by a national
entity. There are several fields which have a parent/child
relationship but are required to be in the same table. Is it
possible to use form/subform to collect the data which will reposit
in the same table; or does the use of form/subform mandate that two
tables be used?
Tx
Rocky

My guess is that you will get write conflict errors. To Access the two
forms will be the same as two users editing a record at the same time.
There might be work-arounds like explicitly saving the record in the main
form before moving to the subform (don't know for sure).

For sure the subform will not be able to contain any required fields unless
those fields are assigned default values at the table level since the
automatic save when you move to the subform will protest about those missing
values otherwise.
 

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