tc100years
asked on
Access 2003 Form: Sync Record with listbox selected item
I need a form that shows 'all the record' in a list box and the selected value (if one) in the list box to be the active record in the form object boxes (see attached photo).
What form record events can I invoke to set the record to be the selected record in the list box? I'm drawing a blank here...
form-example.bmp
What form record events can I invoke to set the record to be the selected record in the list box? I'm drawing a blank here...
form-example.bmp
'find the corresponding record
private sub Listboxname_afterupdate()
with me.recordsetclone
.findfirst "[Software]='" & me.listboxName & "'"
if not .nomatch then me.bookmark=.bookmark
end with
end sub
if you are using recordID for both the form and the listbox, we will use them to find the record
post the rowsource of yuor listbox, boundcolumn
private sub Listboxname_afterupdate()
with me.recordsetclone
.findfirst "[Software]='" & me.listboxName & "'"
if not .nomatch then me.bookmark=.bookmark
end with
end sub
if you are using recordID for both the form and the listbox, we will use them to find the record
post the rowsource of yuor listbox, boundcolumn
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AWESOME! IT WORKED!
Thanks much!
Thanks much!
'to filter the form
private sub Listboxname_afterupdate()
me.filter="[Software]='" & me.listboxName & "'"
me.filteron=true
end sub