Linked ListBox to TextBox

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
 
D

David Benyo via AccessMonster.com

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
 
D

dan.cawthorne

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
 

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