Linked ListBox to TextBox

  • Thread starter Thread starter dan.cawthorne
  • Start date Start date
D

dan.cawthorne

Hi All,

Im Trying to Insert a unbound list box on my form, the form is linked
to a single table "tbl_Status"
The table consists of one field. "SelectStatus"

Now on the form i have one text box that Scrolls through all the
Status, but because there are so many status for people to scroll
through

i have inserted a unbound list box which have the record source as the
same table "tbl'_Status"

What i would like to happen is when i user selects a value from the
list box, it is shown in the bound text box so then the user can
change, or delete the Value.

How do i achieve this?

Regards

Dan
 
This will take you to the record you select in your listbox. In your unbound
list box's AfterUpdate paste:

' Find the record that matches the listbox.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[SelectStatus] = '" & me.YOURLISTBOXNAME & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
This will take you to the record you select in your listbox. In your unbound
list box's AfterUpdate paste:

' Find the record that matches the listbox.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[SelectStatus] = '" & me.YOURLISTBOXNAME & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark



Im Trying to Insert a unbound list box on my form, the form is linked
to a single table "tbl_Status"
The table consists of one field. "SelectStatus"
Now on the form i have one text box that Scrolls through all the
Status, but because there are so many status for people to scroll
through
i have inserted a unbound list box which have the record source as the
same table "tbl'_Status"
What i would like to happen is when i user selects a value from the
list box, it is shown in the bound text box so then the user can
change, or delete the Value.
How do i achieve this?

Dan

Thank you very much David, Just what i was looking for,

thanks again

Danny
 
Back
Top