"John F" <(E-Mail Removed)> wrote in message
news:7498E35B-814B-4DF0-ABA3-(E-Mail Removed)...
> Table "A" is the data for form "A".
> Table "B" is the data for subform "B".
> Table "C" is a lookup for a field in table "B".
> Form "A" is a regular form.
> Form "B" is a datasheet style form.
>
> Control button on form "A" which opens a form to update contents of table
> "C".
> After closeing the form from which table "C" was eddited how do you
> requery
> to make the newly added information to the lookup is available for use?
>
> DoCmd.Requery does not work.
> DoCmd.Requery sfrmBookAuthor does not work.
You need to requery the control on the subform that uses table C as its
rowsource. You haven't named that control, though. Suppose that its name
is "D". Then the general form of the statement is:
Forms!A!B.Form!D.Requery
That is assuming that "B" is actually the name of the subform control on A
that displays the form object "B". That may not be the case; you should
check.
If the statement would be executed in the module of form A, you can
short-cut it like this:
Me.B.Form!D.Requery
Note, though, that if you are using the same event procedure (on form A) to
open the form that edits C and then requery the control, you'll need to open
that form in dialog mode; e.g.,
DoCmd.OpenForm "FormToEditC", WindowMode:=acDialog
Me.B.Form!D.Requery
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)