Cannot requery

M

Micki

I have a simple form on which the first combo box "Master" limits the choices
available in a second combo box "Module." It works fine, except that when
the user has to go back to "Master" to make a correction, the second combo
box does not requery. I have tried placing the event procedure in the
various triggers of Master's properties (After Update, On Change, etc.), but
the command "requery" is never an option for Module. What am I doing wrong?
 
B

Beetle

If you're trying to enter "requery" directly in the properties
sfeet on one of the event procedure lines, that won't work.

You need to click the build (...) button to the right of the
After Update line in the properties sheet of the Master
combo box, then select Code Builder. The code window
will open with the following lines already present (using the
actual name of your Master combo box of course);

Private Sub cboMaster_AfterUpdate()

End Sub

In between those lines put;

Me!cboModule.Requery

(again, using the actual name of your Module combo box).
 
M

Micki

No, that is what I'm doing--I'm in the VBA writer. I've tried a variety of
things, including Me.Module.Requery & DoCmd.Requery. Nothing seems to work.
Would it have something to do with the rowsource query for Module?
 
D

Douglas J. Steele

Try renaming your combo box to something other than Module. Module is a
reserved word, and may be what's causing your problem. For a comprehensive
list of names to avoid (as well as a link to a free utility to check your
application for compliance), check what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top