Requery records in Subform No 2

R

ReidarT

I have an unbound form with 2 subforms.
When I do something in subform1 I want to update subform2(refresh or
requery)
How do I do that?
regards
reidarT
 
B

Brainlord Mesomorph

I have an unbound form with 2 subforms.
When I do something in subform1 I want to update subform2(refresh or
requery)
How do I do that?
regards
reidarT


in the Afterupdate event on the control on sbfrm1:

me.subform2.requery


that will make sbfrm2 refresh and pop back up to the top of the list.
if you want to keep sbfrm2 scolled halfway down, see Steve lebons
"get-set scrollbar" code

http://www.lebans.com/
hth
blm
 
G

Guest

This doesn't work. I have the same problem - on the LostFocus event of a
field in Subform2 I need Access to requery Subform1

Main Form = FrmBatchControl
Subform1 = SubFrmTotalCompleteSubform
Subform2 = SubFrmBatchWorkSubform

This is the code:
Private Sub NumberCompleted_LostFocus()
Me.SubFrmTotalCompleteSubform.Requery
End Sub

It doesn't work. Access returns an error "The object you referenced in the
Visual Basic procedure as an OLE object isn't an OLE object"
 

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