Form/Subform

  • Thread starter Thread starter Matt Flowers via AccessMonster.com
  • Start date Start date
M

Matt Flowers via AccessMonster.com

I have a form that I need to place the id# and idName at the top of the form.
the id# is based off the idtable and the number is unique to the idname and
the id# is an autonumber. I'd like the number to increase everytime the
idName is entered.

What I'd like to do is have a continuous form below it on this form to type
in text line items from 10 - 25 line items for one id# and idName. Then save
the form and receive a blank form to type in another idName and fill in text
items for that idName and id#.

So how it would work is that I would type in the idName and the id# would
populate. Then below, I can type in line items like in a continuous form for
that id# or tied back to that id# just generated. Then save the form and the
line items, receive a blank form to enter another idName.

I don't know how to get this to work on one form. Can someone help me with
this?

Thanks,
Matt
 
Matt,
The table or query behind your main form should based on a table of all
your ID/IDName values. (The One)
The subform will be based on a table or query consisting of multiple
entries against the main ID Example... a tblPhoneLog of multiple calls from
that ID) (the Many)
Your One table generates a unique ID number whenever creating a new
record. (Autonumber/LongInteger)
Your subform table will also have an ID field (LongInteger)

Create a relationship between the main table ID and the sub table ID, One
to Many with Referentail Integrity and Cascading, and make the Join type
"Show all in the main table and only those in the sub table where ID is
equal."

On your form, link the main form to the subform (Parent/Child Link) using
the ID field.

Now, whenever you add a new ID and IDName in the Main, this link causes
all subform records on that record to be associated to the ID on the main
form. In other words, because of the relationship and the link, ID in the
sub will be entered automatically whenever you add a record in the sub.

Ex. ID IDName (Main form)
142 Bob Smith
|
|
142 Discussed project (subform records)
142 Requested Fax
142 Called for info on XYZ
 
Back
Top