requery form and sub form help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I run a query that transfers records from one table in one dtabase to a
second table in a second database.

I have a form that looks at both the current table in the current database
and also looks at the second table in the second database. How do I requery
(or whatever) this view/form of the other database to reflect the fact that
the other database now has the transferred records. at the moment the only
way is to close down the form and re open it. I have tried a
form.xxx.requery then refresh and repaint to no avail. All is see is nothing
untill i re open the form. then i can see the info in the second database and
table, any thoughts gratefully receiived
 
your description of the form/subform is not clear, so i'll assume that you
have a subform on the main form, and the subform displays the records from
"the second table in the second database". i'll further assume that you want
to requery the subform from code that runs in the main form.

the code is simple enough, but it requires that you use the name of the
*subform control* in the main form - which may be different from the name of
the subform in the Forms list in the database window. to get the correct
name, open the main form in design view. click *once* on the subform (within
the main form) to select it. in the Properties box, click on the Other tab,
and look at the Name property.

so let's say that the name of the subform control in your main form is
ChildOtherTable. the correct syntax to requery the subform from within the
main form would be

Me!ChildOtherTable.Form.Requery

hth
 
Back
Top