subform will not refresh

B

babs

I have a subform for jobs to be at list - when I am int the actual form it
requeries and shows only the ones checked off - when I go to the mainform
with the jobs to be at list as a subform - it does not refresh or requery
unless I close and open back up again. I had added a refresh command button
with the following code:
DoCmd.RunCommand acCmdRefresh
when i press the refresh button it refreshes the job list to be at

I add this code to the Onload of the Main form - don't want user to have to
press refresh button but it doesn't refresh jobs to be at list unless press
refresh or close and open - added requery all over the place on load and on
open of all main and subforms.

what am i missing???
Barb
 
R

Richard

Try this: In design view goto your last control on your subform, in the after
update event type in Me.requery


Private Sub YourControl_AfterUpdate()
Me.Requery
End Sub

Richard
 
J

Jeanette Cunningham

Is this what you are trying to do?
The main form shows all jobs.
User chooses some jobs.
The main form should show only the chosen jobs?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

babs

I have a main form shows persons name one subform is their schedule for that
week is on subform - there is another subform(not linked(but is sitting on
this subform)- just a list to view) of jobs to be AT - there is a command
button that navigates to the main Jobs list form - they check off(check box)
jobs to be at - press command button to got to Form based on query of jobs to
be at where boxes checked- this one looks good -only see jobs to be at(this
is the form that is on the main schedule form just as a list to view)-
however when navigate with command button to back to Main schedule the Jobs
to be at list is not refreshed???

thanks,
barb
 
J

Jeanette Cunningham

Use code to requery the Main schedule the Jobs to be at list in the unload
event of the Form based on query of jobs to
be at where boxes checked.

Here is a link to the correct syntax to refer to subforms:
http://www.mvps.org/access/forms/frm0031.htm


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

babs

this is not working - anyone have any other ideas - Please read first post
above for clarification.
Thanks,
Barb
 

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