Autofilling value in Table???

  • Thread starter Thread starter Riks
  • Start date Start date
R

Riks

Hello,
I have a main form and a subform therefore I have 2
tables created. Relationship between the two are ID and
deposit date. ID is primary key, deposit date is secondary
relationship. I am entering the deposit date in the Main
Form. The SubForm Value has a field called deposit_date
where the Control Source=MainForm.deposit_date. This
automatically fills the deposit_date field in SubForm. But
in the SubTable this field is still empty. Can I enter the
date in 1st record and it automatically fills in all
records in the Sub Table? Please HELP! Thank you.
 
Hello,
I have a main form and a subform therefore I have 2
tables created.

Ummm... that sounds like you're thinking backwards. You have two
tables to store data, therefore you have created a Form and Subform as
tools to manage the data. The tables are the underlying reality; the
Forms are a surface manifestation.
Relationship between the two are ID and
deposit date. ID is primary key, deposit date is secondary
relationship.

Huh!? Is the ID a Date field? The link between two tables MUST be on
fields of the same datatype. If the ID is an Autonumber or a Long
Integer, then the foreign key in the many side table must be a Long
Integer. A Date doesn't really make ANY sense as a linking field in
this context!
I am entering the deposit date in the Main
Form. The SubForm Value has a field called deposit_date
where the Control Source=MainForm.deposit_date.

A Control Source can be an expression, like this; or it can be the
name of a table field, in which case it will display and store the
value in that field. It CANNOT BE BOTH - it's either an expression, or
it's a field.
This automatically fills the deposit_date field in SubForm.

It automatically "echos" it. It doesn't "fill" it; it merely displays
it.
But
in the SubTable this field is still empty. Can I enter the
date in 1st record and it automatically fills in all
records in the Sub Table? Please HELP! Thank you.

You'll have to clarify. What is the ID an identifier *of*? Why would
all records of the subtable have the same date field?
 
Back
Top