Refresh Subform in Access

N

Nunu

Ok, folks... here's my problem.

I've created a form with 6 combo boxes. The user will select their
limits in the combo boxes (or leave blank for no limits). A command
button creates the SQL string and updates a query within my database.

The subform displays the query results, which will allow the user to
edit any fields. (The fields displayed never changes, just the
criteria for what is displayed). For example, given three list boxes
for Personnel Number, Pay Period, and Envelope Number, a user can
search on any combination of these fields, and the subform will display
the results.

THe problem i'm having is getting the subform to automatically refresh
to display the fields with the Criteria, as soon as the user hits a
command button to update the query results. I've tried the
[subform].requery command in the buttons On Click command, as well as
in the subforms On Current command. nothing works. If i go to design
view, and then return to the form, however, the correct results do
appear. Any ideas how i can get my subform to automatically refresh
when the Update button is Clicked?

Anyone who helps will get a free Twix bar (Shipping and Handling not
included)

N
 
D

Douglas J Steele

What's the code you're using to requery?

Also, what's the name of the control that holds the subform? Note that this
may or may not be the same as the name of the form being used as the
subform. If you dragged the one form onto the other, odds are that the names
will be the same. However, if you added a subform control to your form (from
the toolbox), and then set up the subform, the names won't be the same.
 

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