Managing a ComboBox DataSource in a Continuous Form

  • Thread starter Thread starter kc-mass
  • Start date Start date
K

kc-mass

Hi

I have a continuous form which has a combobox on each line.

I want to change the datasource for the combobox depending on what type of
data is in the other fields of that line. I know how to do that.

My problem is that I do not know how to tell which line of the form has been
clicked on.
How can I tell which line in the form I am on so I can set the right data
source??

Thx

Kevin
 
kc-mass said:
Hi

I have a continuous form which has a combobox on each line.

I want to change the datasource for the combobox depending on what type of
data is in the other fields of that line. I know how to do that.

My problem is that I do not know how to tell which line of the form has
been clicked on.
How can I tell which line in the form I am on so I can set the right data
source??


I'm not sure I undertsand the question. When a user clicks on one of the
rows of a continuous form, the form's Current event will fire, and that
row's field values become those that are known by name to the form (as in
"Me.FieldName"). You don't need to do any indexing by line number. So the
Current event is a reasonable place to set the combo box's rowsource.

There can be an issue with combo boxes when you set the rowsource depending
on the current row, and the combo box's LimitToList property is True, and
the values displayed by the combo box in other rows are no longer in the
rowsource. Various workarounds for this issue exist. If that's your
problem, post back for further discussion.
 
Back
Top