G
Guest
Hi:
I'm developing an application using access 2k. The problem i have is the
following:
I have a form with a subform, inside the subform I have a combobox, which
is filled with the result of a certain query by default. What I need is to
change the query depending on a condition based on the current record. The
second query is just like the first one, only changes the where clause.
What I've done is put my code into the OnCurrent Event like this:
Me.Subform.Controls("ComboBox").RowSource = IIf(IsNull(Me.SomeField),
"Query1", "Query2")
But when I run the form I get an error 2455 (Something like i have written
an invalid reference to a form).
What am I doing wrong?
TIA
I'm developing an application using access 2k. The problem i have is the
following:
I have a form with a subform, inside the subform I have a combobox, which
is filled with the result of a certain query by default. What I need is to
change the query depending on a condition based on the current record. The
second query is just like the first one, only changes the where clause.
What I've done is put my code into the OnCurrent Event like this:
Me.Subform.Controls("ComboBox").RowSource = IIf(IsNull(Me.SomeField),
"Query1", "Query2")
But when I run the form I get an error 2455 (Something like i have written
an invalid reference to a form).
What am I doing wrong?
TIA