Requery table from form

F

Fox

Hi all,

I am trying to figure out the requery function..... but am not sure this is
the method I need.

I have a main form called projects that has a subform called addcomponents.
the subform addcomponents adds components to the addcomponent table and has a
list box that is populated by the component table.

I've placed a cmdbutton on the projects main form to open the form
components so that components can be added to the componenttable , however
the new components are not available in the list box on the subform
addcomponents until I close the main project form and reopen.
How do I use the requery method so that the subform component list box gets
updated without closing the main form?
Thanks!
 
F

Fox

Where do I put the requery?
On the addcomponent popup form....
on the addcomponent field dropdown list box
On the main form somewhere?
I don't know where to put the requery....on which event...
I have it on several places....but not working ...<S>
 
F

Fox

I actually tried the after update thing and it would not work to update the
list box....
I ended up putting this in the main forms activate event and it actually
worked...not sure why....but after trying them all this one worked so unless
there is a reason not to use this to update a list box that is pulling data
from another table than the main form then I'll just go with it.
Thanks for all your help!!

Private Sub Form_Activate()
[Forms]![StandardStitchesfrm]![Abbreviation].Requery
End Sub
 

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