General information
Category:
Forms & Form designer
>Can Someone please offer some insight??
>
>In my search for the ever changing correct way to do things..
>
>The Over-Simplified Vesrion:
>
>If I have a combo-box (Referred to as comStates) that contains the Names of States of the USA and this Combo-Box's Control Source is thisform.cState_Name
>
>My Second Combo Box would Contain the users of that state based upon
>the Value of the first combobox. I would do a SQL Statement in the Rowsource of the 2nd comboBox that said something like...
>
>Select * from States where st_Name=thisform.comStates.Value into Cursor comNames
>
>Of course, this will Puke... I was wondering how a more 'Seasoned' approach to this would be??
>
>Thanx Much!!!
>Bob :-)
Bob:
I did something similar to what Dave told you. See if this will help:
Make a form property. It has to be an array so make sure that you dimension it.
Make the user combo RowSource the array property. The RowSourceType is array.
In the state combo valid event:
**-- Valid
*
select name from users ;
where state = This.DisplayValue ;
into array ThisForm.aUsers
with ThisForm.combo1
.Requery
.ListIndex = 1
endwith
HTH,
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