using sub-forms

  • Thread starter Thread starter Liat
  • Start date Start date
L

Liat

Hi,

I have a form and a sub form that are connected through
the ID field. I use access 2000.

When I choose a name in the main form, all it's details
should appear in the subform.
It looked like it was OK. When I move from record to
record in the main form, the details are being updated.

The problem is that when I change the name, the details
are not updated immediately. only after I go to another
record and then return, I see the correct details.

Should I add in a script "afterUpdate" of that field that
it will set the recordNumber to be the correct one?

How do I do that?

Thanks a lot
Liat
 
Hi,

I have a form and a sub form that are connected through
the ID field. I use access 2000.

When I choose a name in the main form, all it's details
should appear in the subform.

That would be VERY unusual. It suggests that you're basing the Subform
on the same table as the mainform, and even on the same record. This
is a recipe for confusion! What "details" are these? From the same
table, or a different one?
It looked like it was OK. When I move from record to
record in the main form, the details are being updated.

What are the Master and Child Link Fields of the subform control? For
that matter, what are the recordsource properties of the form and
subform?
The problem is that when I change the name, the details
are not updated immediately. only after I go to another
record and then return, I see the correct details.

You wouldn't expect them to be changed. Let's say you have one record
in the table with ID 346, and the name "Jim Smith"; and another record
with ID 432, with the name "Janet Schultz". If you open record 346 and
change the name to "Janet Schultz" you will now have two records in
the table - 346 and 432 - with "Janet Schultz" in the name; one of
these records will be linked to the details for Jim Smith, and the
other will be linked to the details for Janet Schultz. There will be
no record anywhere that record 346 was once Jim Smith.
Should I add in a script "afterUpdate" of that field that
it will set the recordNumber to be the correct one?

I'm not understanding what you're trying to accomplish.

John W. Vinson[MVP]
(no longer chatting for now)
 
I am sorry for the bad explaination....
I went through your questions, that helped me to fix the
problem...

Thanks a lot,
Liat
 
Back
Top