Return Record; Display Record from List Box

  • Thread starter Thread starter Tiffany
  • Start date Start date
T

Tiffany

Hi,
Does anyone know how to set up a Combo box or list box
that when the item is selected, the corresponding record
is displayed?
I've followed the Help directions.. but it does not return
the record.

Thanks a mil,
Tiffany
 
Tiffany,

If you turn the Wizard button on on your controls toolbox
and let it help you create the Combobox, you will see an
option to 'Find a record on your form' as you go through the
process. When it creates the combo, it will drop code
similar to this into the 'AfterUpdate' event...

Me.RecordsetClone.FindFirst "[Customer ID] = '" &
Me![cboFindCustomer] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Thanks Gary,
I did do that and pasted exactly what was given. It
allowed me to select the item in the list and the item
populated the list box itself, but did not bring forth the
record linked to that item. I will copy the procedure
into my next reply so that you can see what I have.

Tiffany
-----Original Message-----
Tiffany,

If you turn the Wizard button on on your controls toolbox
and let it help you create the Combobox, you will see an
option to 'Find a record on your form' as you go through the
process. When it creates the combo, it will drop code
similar to this into the 'AfterUpdate' event...

Me.RecordsetClone.FindFirst "[Customer ID] = '" &
Me![cboFindCustomer] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
Tiffany said:
Hi,
Does anyone know how to set up a Combo box or list box
that when the item is selected, the corresponding record
is displayed?
I've followed the Help directions.. but it does not return
the record.

Thanks a mil,
Tiffany


.
 
It's possible that yours would be a little different with
the quotes depending on data type. This would be a numeric
version...

Me.RecordsetClone.FindFirst "[Customer ID] = " &
Me![cboFindCustomer]

Let's see the code if this doesn't work. Also, you may have
a problem if you are in a DataEntry mode where it can't see
all of the underlying records.


--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
Thanks Gary,
I did do that and pasted exactly what was given. It
allowed me to select the item in the list and the item
populated the list box itself, but did not bring forth the
record linked to that item. I will copy the procedure
into my next reply so that you can see what I have.

Tiffany
-----Original Message-----
Tiffany,

If you turn the Wizard button on on your controls toolbox
and let it help you create the Combobox, you will see an
option to 'Find a record on your form' as you go through the
process. When it creates the combo, it will drop code
similar to this into the 'AfterUpdate' event...

Me.RecordsetClone.FindFirst "[Customer ID] = '" &
Me![cboFindCustomer] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
Tiffany said:
Hi,
Does anyone know how to set up a Combo box or list box
that when the item is selected, the corresponding record
is displayed?
I've followed the Help directions.. but it does not return
the record.

Thanks a mil,
Tiffany


.
 
Back
Top