Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Update/refresh/requery all fields in a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DominicGreco - 19 May 2008 18:54 GMT
I want to embed a piece of code in a "Previous Record" and "Next Record"
button that will update (requery) ALL the combo boxes on a form.

I use a Query to populate a combo/list  box. However, after the data is
entered and the record saved, I move to thw next record. If I go back to the
previous record, it looks like the combo boxes retain the information from
the last entry. I need to constantly hit "F9" to refresh them so that I can
see the entered data.

Can someone point me in the direction on how this is done? I've tried looking
under "Refresh" in the help file, in my miriad Access Books, or on line and
haven't been able to find anything useful.
John W. Vinson - 20 May 2008 03:02 GMT
>Can someone point me in the direction on how this is done? I've tried looking
>under "Refresh" in the help file, in my miriad Access Books, or on line and
>haven't been able to find anything useful.

Me.Refresh

Maybe you were checking in the Help from the design window rather than from
the VBA editor? That gets you a different help file.

From the VBA help file:

Refresh Method
See AlsoApplies ToExampleSpecificsThe Refresh method immediately updates the
records in the underlying record source for a specified form (form: An Access
database object on which you place controls for taking actions or for
entering, displaying, and editing data in fields.) or datasheet (datasheet:
Data from a table, form, query, view, or stored procedure that is displayed in
a row-and-column format.) to reflect changes made to the data by you and other
users in a multiuser environment.

expression.Refresh
expression    Required. An expression that returns one of the objects in the
Applies To list.

Or Me.Requery, although that is rather more drastic; it will (among other
things) reposition your form to the first record in the recordset.
Signature


            John W. Vinson [MVP]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.