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 / December 2007

Tip: Looking for answers? Try searching our database.

Requery combobox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
szag - 12 Dec 2007 20:42 GMT
I have a form that includes a combobox that has the following in its on enter
event:

Private Sub cbProjectPhase_Enter()
Me.cbProjectPhase.Requery
End Sub

The query that is tied to this combox uses another field ("Cost Center") on
this form as criteria to select records for this combobox.

It works fine except when I go to the next record and click on that combobox
it removes what is showing in the previous record's combobox's field because
my selection "Cost Center" is different this time.

I understand why this happens but I don't know how to get around it. It
stores the bound information properly in the table but just doesn't show
correctly on the form. Any suggestions?
Klatuu - 12 Dec 2007 22:23 GMT
Requery the combo in the form current event:

   If Not Me.Newrecord Then
       Me.cbProjectPhase.Requery
   End If
Signature

Dave Hargis, Microsoft Access MVP

> I have a form that includes a combobox that has the following in its on enter
> event:
[quoted text clipped - 13 lines]
> stores the bound information properly in the table but just doesn't show
> correctly on the form. Any suggestions?
szag - 13 Dec 2007 20:28 GMT
Thanks!

>Requery the combo in the form current event:
>
[quoted text clipped - 6 lines]
>> stores the bound information properly in the table but just doesn't show
>> correctly on the form. Any suggestions?
 
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.