Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Category:
Forms & Form designer
>>>It's not allowed to use "THISFORM.MyValue" in the SQL of a ComboBox RowSource. I thought if I created a variable in the form's INIT that would keep it in scope and I could use that in the SQL, but it's out of scope. I hate to use a global variable, but is that the best solution?
>>
>>First, ThisForm.MyValue is a property, not a variable and you'd normally create it in the Form Designer.
>
>Yep, that's why I tried both. Form property and a variable created in the INIT. Obviously I wasn't clear.
>
>>Second, the form's Init runs after the combo has been initially populated.
>
>Great. I just created a global in the form's LOAD until someone comes up with better a solution.
>
My recommendation would be to change the RowSourceType to Alias, and put the query in the combo's Requery method. Then, add This.Requery() to the combo's Init.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only