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 / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

When to requery a combo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bg_ie@yahoo.com - 21 May 2007 15:08 GMT
Hi,

I have a combo on my form where the user can select from a list of
names. I also have a button which onpens a form where the user can add
or delete names. This is the code I'm using -

Private Sub CommandAddNewName_Click()
   DoCmd.OpenForm "frmPerson"
End Sub

Private Sub Form_Activate()
   comboBoxAuthorID.Requery
End Sub

Am I correct to use Form_Activate() to update the combo? I'm thinking
there is a better way...

Thanks,

Barry.
Ofer Cohen - 21 May 2007 15:17 GMT
Open the form as dialog, that will pause the code until the form is closed,
and then requery the combo

Private Sub CommandAddNewName_Click()
   DoCmd.OpenForm "frmPerson" , , , , , AcDialog
   Me.comboBoxAuthorID.Requery
End Sub

Signature

Good Luck
BS"D

> Hi,
>
[quoted text clipped - 16 lines]
>
> Barry.
 
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.