Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery Module that can't find form

Status
Not open for further replies.

mlunter

MIS
Nov 15, 2005
9
US
Hello,

I have a form (called "A"), with another subform (called "B") inside of it. There are three listboxes in form A that use queries to lookup values. Form A is unbound. Form B, which is bound to a query, is supposed to take values from form A.

I have the default values for the fields on Form A set. When I first open the form, everything works as it should. Form A and Form B popup with all the correct information. I want to be able to requery Form B with every listbox update from form A.

So I wrote a module on the AfterUpdate property of one of the listboxes that is as follows:


Private Sub B_AfterUpdate()
Forms!b.Requery
End Sub



Microsoft Access keeps telling me it can't find Form b referred to in the macro or visual basic code. When I changed the code to requery form a, things work fine. I tried changing the name of the form and everything. Nothing is working. Any suggestions would be greatly appreciated.

Thank you,
MSL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top