recordsets and subforms

  • Thread starter Thread starter Hukleberie
  • Start date Start date
H

Hukleberie

Guest
I am working with an ADO recordset inside a subform. The recordset is based upon a SQL statement that retrieves data according to a code chosen from a combo box on the main form.

The problem is that I can't get the main form to "refresh" the subform. When I open the subform by itself and enter in data it works properly, but when I open the main form and choose a code from the combo box it does nothing. I have tried using doCmd.ReQuery "subform" but the subform does not change. Any ideas?

Thanks for any help!

Bradley McDonald
 
Use this format to requery subforms.

Forms![Mainform]![Subform].Requery

Duane Barker
 
I'm having a similar problem. Using the format suggestion to reference the subform and requery doesn't seem to work.
The details of my situation are as follows.
The main form is unbound.
The two subforms are placed on seperate tabs of a tab control. Since the main form is unbound, there are no master/child links.

I'm trying to filter the contents of each subform based on the user selection in a combo box.

So, is the problem that the main form has to be bound and the subforms linked to it?

Thanks in advance.
 
the code for this is:

Form![mainform]![subformname].[Form]![controlname].Refresh (or requery or whatever)

To refresh whole subform

Form![mainform]![subformname].[Form].Refresh (or requery or whatever)



[This message has been edited by Ron Bell (edited 05-08-2001).]
 

Users who are viewing this thread

Back
Top Bottom