use combo box value to move to record

M

mcnews

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.
 
R

Rick Brandt

mcnews said:
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.

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.
 
M

mcnews

Me.RecordsetClone.Findfirst "[ID] = " & Me![ComboOrListboxName]
Me.Bookmark = Me.RecordSetClone.Bookmark
 
M

mcnews

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.

danged if you ain't correct!
had to fix that real quick.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top