Repost: Requery Subform

  • Thread starter Thread starter David Ehrenreich
  • Start date Start date
D

David Ehrenreich

I would like to requery a subform from another form. I
have forms in two seperate mdf files, and tables in another
(Frm1, Frm2) and i need frm1 to requery a subform in form
2 when it is updated. I have tried this method but only
works when the forms are in the same file.

Private Sub Form_AfterUpdate()
If CurrentProject.AllForms("frm2").IsLoaded Then

Forms![frm2]![frm2Sbfrm.Requery

End If

End Sub

I was wondering if currentProject has something to do with
it?

Any help would be great.

Thank you
David Ehrenreich

..
 
when you say forms in seoerate MDBs, do you m ean you have two instances of Access running??
 
Yes, here is a example

Computer 1 - BackendDb - Tables
Computer 2 - Signin - Frm1
Computer 3 - Proctor1 - Frm2
Computer 4 - Proctor2 - Frm2
Computer 5 - Proctor3 - frm2
etc.
-----Original Message-----
when you say forms in seoerate MDBs, do you m ean you
have two instances of Access running??
 
wow... hmmm

I don't think you can force a requery on a different machine. (2 open MDBs on 1 machine, maybe

my best and only idea, is that you have some table in the backend that stores a cue field. (maybe just a yes/no field called UpdateNow, or it could be more complex, maybe a date/time field) then on 2nd form you have an ontimer event that looks for that field and requeries itself when needed

How often that timer fires depends depends on how much network traffic you want to create

Simpler, just have form2 requery iteself every X minutes. (that might make more net chatter though

HTH bl
 
Back
Top