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 Programming / March 2005

Tip: Looking for answers? Try searching our database.

combo requery

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles - 31 Mar 2005 17:05 GMT
Hi I have a form which I use to update a table.  When I
add to the table through the form the form I return to on
completion the combo box does not show the record entered
on the previous form.

How can I get the cbo to requery shall I use the onclose
of the popup entry form and say that the main form should
now have focus then cbo.requery on the combo or shall i
use the ongotfocus of the main form to requery the cbos
each time it thinks it has just gained focus?

I hope you get me!!

Charles
Brendan Reynolds - 31 Mar 2005 22:29 GMT
The GotFocus event won't work. From the help topic 'GotFocus Event' ...

<begin quote>
A form can receive the focus only if it has no controls or if all visible
controls are disabled. If a form contains any visible, enabled controls, the
GotFocus event for the form doesn't occur.
</end quote>

The Activate event might work, but I have not tested that. I would use the
Close event of the popup form, as in your first suggestion. This is a
technique that I have used myself in similar circumstances ...

Forms("NameOfMainForm").Controls("NameOfComboBox").Requery

Signature

Brendan Reynolds (MVP)

> Hi I have a form which I use to update a table.  When I
> add to the table through the form the form I return to on
[quoted text clipped - 10 lines]
>
> Charles
 
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.