I am attempting to populate a listbox based on the selected item of
another listbox. I have attempted to use a Parameter Query, but have
been unsuccessful. Below is the portion of my code. Is it just that
VB3 cannot set the recordsource of a data control to a parameter query
or am I missing something. Also, it this the best way to go about it?
'the index holds the StateID
stateid = listState.ItemData(listState.ListIndex)
sqry = "PARAMETERS stateid integer; "
sqry = sqry & "SELECT fldCityID, fldCityName FROM tblCitys "
sqry = sqry & "WHERE fldStateID = stateid ORDER BY fldCityName"
dataCitys.RecordSource = sqry
It is on the Refresh that I keep getting '1 parameter were expected,
but only 0 were supplied. I guess I could put an If statement within
my Do loop to test before I do an 'AddItem' but that would seem to
slow the process even more.
Thanks in advance for any assistance.