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 / New Users / September 2007

Tip: Looking for answers? Try searching our database.

use combo box value to move to record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mcnews - 27 Sep 2007 18:36 GMT
i'm using a bound form that contains combo boxes that have values from
the table that is bound to the form.
for axample social sec number.  there will only be a hundred or so
records so it won't be that bad.

how do i move to the recrord that the combo box contains the value
for?

NOTE: please try to answer without lecturing about what microsoft or
somebody thinks about filling combo boxes.
Rick Brandt - 27 Sep 2007 19:11 GMT
> i'm using a bound form that contains combo boxes that have values from
> the table that is bound to the form.
[quoted text clipped - 6 lines]
> NOTE: please try to answer without lecturing about what microsoft or
> somebody thinks about filling combo boxes.

A ComboBox is either used to navigate records (what you want) OR it is
bound.  You cannot use the same ComboBox for both.  The ComboBox wizard will
build an unbound control for navigating.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

mcnews - 27 Sep 2007 20:00 GMT
> > i'm using a bound form that contains combo boxes that have values from
> > the table that is bound to the form.
[quoted text clipped - 15 lines]
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com

danged if you ain't correct!
had to fix that real quick.
mcnews - 27 Sep 2007 19:11 GMT
Me.RecordsetClone.Findfirst "[ID] = " & Me![ComboOrListboxName]
Me.Bookmark = Me.RecordSetClone.Bookmark
Klatuu - 28 Sep 2007 15:01 GMT
Although unlikely, you should always include code that will not try to
navigate to the record if it was not found:

   With Me.RecordsetClone
       .Findfirst "[ID] = " & Me![ComboOrListboxName]
       If Not .NoMatch Then
           Me.Bookmark = .Bookmark
       End If
   End With

Signature

Dave Hargis, Microsoft Access MVP

>  Me.RecordsetClone.Findfirst "[ID] = " & Me![ComboOrListboxName]
>  Me.Bookmark = Me.RecordSetClone.Bookmark
 
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.