Thanks for the details, Dan! I think I understand what
you're saying.
I checked the Access Help on Requery. It says it only
works on the active object (in this case, FormB) unless I
use the Requery Method in a VBA routine. Since I want to
requery FormA, it looks like I'll have to use the Method.
This is getting deep (for me): The actual data I want
refreshed in FormA is in one of its subforms;
specifically, I want to see the row that FormB added.
So . . . do I requery the query on which the subform is
based? How do I write that?
The example I'm looking at is directly out of Help:
Sub RequeryList()
Dim ctlList As Control
' Return Control object pointing to list box.
Set ctlList = Forms!Employees!EmployeeList
' Requery source of data for list box.
ctlList.Requery
End Sub
But the object I want to requery is not a list box, so I
need some help on how what I want to do would look
different.
Gary
-----Original Message-----
Hi,
If you're closing FormB, then put it in that form's close event.
You have to be a bit careful here if FormB can be opened on it's own.
Use the IsLoaded function from the Northwind db to make sure FormA
is open before you requery it.
If FormB remains open, it's a bit trickier. You could try the activate event of
Form A but you would only want that to fire if you're returning to FormA from FormB.
You could have a public boolean variable indicating
whether FormA should be requeried.
Set it to true at some point/event in FormB and then
check it in FormA's activate event.