Listbox

G

Gregory

Hello

I would like to go from a list box << on 1 form >> to a specific record << on another form >> based on the selected list box option. I imagine this isn't too difficult but I am new to this

Any assistance would be greatly appreciated

Thanks to Dan for answering a poorly worded question
 
D

Dan Artuso

Hi,
First, both of these methods assume that the bound column of your listbox
is a unique identifier, such as a ClientId or something similiar and that there is also
a control on the second form that displays that same value.

If you want to open the other form and just display the details of the selection,
use the criteria argument of the OpenForm method.

If the other form is already open and you want to 'move' it a specific record then:

Forms!yourOtherForm.RecordsetClone.FindFirst "id = " & Me.yourListbox
Forms!yourOtherForm.Bookmark = Forms!yourOtherForm.RecordsetClone.Bookmark

substitute the name of the conrol on the second form that contains your identifier for 'id'


--
HTH
Dan Artuso, Access MVP


Gregory said:
Hello,

I would like to go from a list box << on 1 form >> to a specific record << on another form >> based on the selected list box
option. I imagine this isn't too difficult but I am new to this.
 
D

Dan Artuso

Hi,
I should have said:
substitute the name of the field in the second form's recordset that contains your identifier for 'id'
 

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