We help IT Professionals succeed at work.

How to requery form?

gcgcit
gcgcit used Ask the Experts™
on
After a listbox click I'm copying information into some textboxes from a recordset.  I want to then requery the form... when I do this:

Me.frmLCT.Requery

It says "method or data memeber not found.  Is it because I have it on the listbox click event?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
if the listbox is on form "frmLCT"

use

me.requery
Your Syntax would be:
Me.Requery

Not necessary to refer to Forms name.

HTH,
Daniel

Top Expert 2016

Commented:
if the listbox is on a different form

Forms!frmLCT.requery
Hamed NasrRetired IT Professional

Commented:
Me.Requery for the form as capricorn1's
Me refers to the uurent form that runs the code.
Me.ListBox.Requery for the control.
OnClick is not the same as AfterUpdate - even on the list box.
OnClick - a mouse has been used, but the user may still be active (GotFocus) in the list box.

Move the code to AfterUpdate on the list box.