Having brain freeze and can't requery a Listbox on a mainform from the mainform's subform.
I would have thought
would have workedCode:Forms!frmBookingNewTheatre!ListTheatre.Requery
suggestions?
Having brain freeze and can't requery a Listbox on a mainform from the mainform's subform.
I would have thought
would have workedCode:Forms!frmBookingNewTheatre!ListTheatre.Requery
suggestions?
The only example i could find of referencing a combo from a subform is
Forms!frmFillerUnitsEdit![cmbFillerDest] = 0
Here is an example from one subform to another sub. Still not a requery but should work?
Forms!frmQuoteCreate.tglArchiveFilter.Caption = "Current"
Try setting focus to the main form first!
Forms!frmBookingNewTheatre!ListTheatre.SetFocus
Forms!frmBookingNewTheatre!ListTheatre.Requery
Works - thanking YOU
I kept staring at the line of code wondering why. Then I looked up a couple lines in my code and Doh!
Sorry to bring this one back up but can you requery a listbox on a main form using me.parent.form!listbox.requery ?
have I got it wrong?
If you are calling it from within the forms module it is
Me.listbox.requery
from another module it is
Forms!frmName!lstBox.Requery
If you are in a subform's module then I believe you can also use
Me.Parent.Parent!lstBox.Requery
But I just use Forms!frmName!lstBox.Requery from a subform.
yeah that is what I had, forms!frmname etcIf you are calling it from within the forms module it is
Me.listbox.requery
from another module it is
Forms!frmName!lstBox.Requery
If you are in a subform's module then I believe you can also use
Me.Parent.Parent!lstBox.Requery
But I just use Forms!frmName!lstBox.Requery from a subform.
I thought it was causing issues - like making it go blank but turns out it has something to do with data entry
https://www.accessforums.net/forms/p...ext-38965.html
Should Me.Parent.Parent!lstBox.Requery actually be Me.Parent.Form!lstBox.Requery or Me.frmMainform.Parent!lstBox.Requery or Me.Parent.frmMainform!lstBox.Requery as Me.Parent.Parent!lstBox.Requery comes up with an errorIf you are calling it from within the forms module it is
Me.listbox.requery
from another module it is
Forms!frmName!lstBox.Requery
If you are in a subform's module then I believe you can also use
Me.Parent.Parent!lstBox.Requery
But I just use Forms!frmName!lstBox.Requery from a subform.
Try
Me.Parent!lstBox.Requery
and make sure you have a child and main link defined.
yeah I tried that I found it was because all the fields had to filled before they would show in the listbox - meaning I had to update the query to include if unfilled (relationship stuff I guess)