Re: Add new record automatically

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanx Tina. It seems like I can't actually do what I wanted to do.
No problem.

Cheers.
Rana.


"tina" wrote:

The primary form is 'Personal info. Primary' and like I said all
the other forms are linked to it.

the only way two forms can be "linked" is when one is loaded into a subform
control in the other as a subform object, and even then the forms are not
linked unless the LinkChildFields and LinkMasterFields properties of the
mainform's subform control are set appropriately. do you load "all the other
forms" into your primary form, in one or more subform controls?

I want access to automatically insert the
new ROTAID into the other forms once I enter it in 'Personal info.
Primary'.

you can't *insert* data into forms, because forms don't store data - tables
do. and you don't want to create an essentially blank (except for the
primary and foreign keys) record in every child table, each time you create
a record in the parent table.

after entering a record in the parent ("primary") table, you can use several
methods to add related records to any child table, as needed. one is the
mainform/subform method. another is a form bound to a child table, with a
combobox control bound to the foreign key field, with its' RowSource set to
the parent table, with the BoundColumn pointing to the parent table's
primary key field. still another way is to open the mainform and then open
another form (that is bound to a child table) in a separate window, again
with a couple different options on providing the primary key value of the
mainform's Current record to the child form, to be added to the foreign key
field in the child table.

the common factor in the above methods, and other not mentioned, is that the
primary key value of the parent table is not entered in a new record in a
child table *until you are actually entering a valid - if not entirely
complete - record in the child table.

hth


"Rana" <Rana@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DB20CD60-4C65-4BFF-882C-12291C7FB4A7@xxxxxxxxxxxxxxxx
Hi,

I've got a couple of forms that all have a field "ROTAID' which is the
primary key for one of the tables and is linked to all the other tables.
I've
created data entry forms for all these tables just to make it a bit more
user
friendly. The primary form is 'Personal info. Primary' and like I said all
the other forms are linked to it. I want access to automatically insert
the
new ROTAID into the other forms once I enter it in 'Personal info.
Primary'.

Is there a simple way of doing that?
Any info./advice is highly appreciated.

Cheers,
Rana.



.



Relevant Pages

  • Re: Connecting to the Same Table Twice
    ... RelationshipID (primary key) ... RelationshipName (parent, guardian, authorized pick-up, emergency contact, ... you might put spouse names into a separate table linked to this table). ... for each link between a child record and a caregiver record, ...
    (microsoft.public.access.gettingstarted)
  • Re: Connecting to the Same Table Twice
    ... > RelationshipID (primary key) ... > RelationshipName (parent, guardian, authorized pick-up, emergency contact, ... > you might put spouse names into a separate table linked to this table). ... > for each link between a child record and a caregiver record, ...
    (microsoft.public.access.gettingstarted)
  • Re: MS Access
    ... primary key has some blank, ... We can call this our parent or so called "main" table. ... you must declare a new column in this child table. ... In the above you can tell the customer with an id of 2 has a favorite color ...
    (microsoft.public.access.gettingstarted)
  • Re: Data Normalization
    ... CustomerID foreign key. ... of the database whether an SSN would be a good candidate for a primary key. ... applicable that relates that given record to it's parent. ... Create the relationship between the child table and my new parent ...
    (microsoft.public.access.queries)
  • Re: Trigger/Foreign Key limitation for real?
    ... field in it to match the parent primary key. ... I tried to create an instead of update trigger on the parent table. ... I tried to create an instead of update trigger on the child table. ...
    (microsoft.public.sqlserver.programming)