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 / April 2008

Tip: Looking for answers? Try searching our database.

Refreshing combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
medirate - 01 Apr 2008 17:16 GMT
I have a combo box which allows the user to select an employee. The employee
and his record are then displayed using a main form and a subform.

The problem is that I also allow the user to scroll through the employee
record using the record selectors. So the record might be on Jane Adams
while the combo box still shows John Smith. As a result, I've noticed the
wrong information being placed in the record.

How can I get the combo box to refresh its display with the main form's
record source, or alternately can you tell me how to clear the combo box
once a user has made a selection?
M Skabialka - 01 Apr 2008 17:02 GMT
In the after update code for your combo, to clear the combo, place something
like this:
me!mycombobox = ""
or
forms!myform!mycombobox = null

Or in the On Current event for the form, to show the current record,
something like one of these:
forms!myform!mycombobox = forms!myform!employeename
me!mycombobox = me!employeename
mycombobox = employeename
Mich

>I have a combo box which allows the user to select an employee. The
>employee
[quoted text clipped - 8 lines]
> record source, or alternately can you tell me how to clear the combo box
> once a user has made a selection?
Klatuu - 01 Apr 2008 21:31 GMT
If the intent of the combo is to look up employees, it should not be a bound
control.
The employee name field should be bound to a text box and the combo should
be used only for locating an employee record.
Signature

Dave Hargis, Microsoft Access MVP

> I have a combo box which allows the user to select an employee. The employee
> and his record are then displayed using a main form and a subform.
[quoted text clipped - 7 lines]
> record source, or alternately can you tell me how to clear the combo box
> once a user has made a selection?
 
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.