Combobox Sected Item

H

Harold

Forgive me if I am not clear...

I have 5 fields in a table. They are codes that are separate fields to
ensure referential integrity from other tables. There is a continous form
that has an unbound combobox that has it's width limited to show only the
dropdown arrow. The rowsource for this combobox is the concatenation of the
five fields delimited by periods. The afterupdate event from the combobox
updates the individual fields just fields just fine.

Adjacent on the left is a textbox that displays the concatenation of the
five fields.

Everything works well except I need to goto and select in the combobox based
upon the adjacent textbox. Obviuosly because it is unbound the autoselect
provided nt Access has no way to locate the select entry.

Any help would be apprecaited. Thanks
 
S

Stefan Hoffmann

hi Harold,
I have 5 fields in a table. They are codes that are separate fields to
ensure referential integrity from other tables. There is a continous form
that has an unbound combobox that has it's width limited to show only the
dropdown arrow. The rowsource for this combobox is the concatenation of the
five fields delimited by periods.
Sorry, this makes no sense for me. Can you explain why you can do this
in your data model?


mfG
--> stefan <--
 
H

Harold

Stefan Hoffmann said:
hi Harold,

Sorry, this makes no sense for me. Can you explain why you can do this
in your data model?


mfG
--> stefan <--
When I click on the combobox nothing is selected because it is unbound. I would like to have the combobox open to the row in the adjacent field.
 
H

Harold

I got the answer

Private Sub Combo87_Enter()
Dim i As Integer
For i = 0 To Me![Combo87].ListCount - 1
If Me![Combo87].Column(0, i) = Me!ComponentID Then
Me.Combo87.ListIndex = i - 1
Me!Combo87.Dropdown
Exit Sub
End If
Next i
End Sub
 

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