Link Bound Form to Combo

  • Thread starter auujxa2 via AccessMonster.com
  • Start date
A

auujxa2 via AccessMonster.com

As an example, let's say I create a form that's bound to Master_tbl, which
has 20 records. The bottom left of the screen shows the record selectors to
scroll L-R to view the 20 records.

Can I link that to a combo box to jump to a specific record, instead of
scrolling until I find it?

Thanks
John
 
F

fatdenz

Hi John
There are quite a few way to achieve this
One way, only requiring a line or 2 of code, is the use of the findfirst and
bookmark properties

Drop a combo box onto the form that is bound to Master_tbl

Using the following assumptions
Call the combo box cbo_Master
Assume the row source of cbo_Master is 'select * from Master_tbl'
Assume your Master_tbl has a field called MasterID
Assume this is the first field in the table Master_tbl
Assume this field is the actual one you want to search on :)

In the AfterUpdate of the combo have code like this:
Private Sub cbo_Master_AfterUpdate()
Me.RecordsetClone.FindFirst "MasterID = " & Me.cbo_Master
Me.Bookmark = Me.RecordsetClone.Bookmark
end sub

Hope this helps - Have a great day

FatDenz
 

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