filtering contents of listbox when form opens

  • Thread starter Thread starter BRC
  • Start date Start date
B

BRC

I have a form with a listbox. The form is opened by a call from
another form. I would like to filter the contents of the list box with
either openargs (or something similar). I know how to pass the value
with openargs but not sure how to apply the value to filter listbox
contents. Any suggestions would be appreciated. Thanks BRC
 
Assign the openargs value to a variable, then use the variable in a sql
string to make it the listbox's rowsource.
For example, (pseudo code)
mystr= me.openargs
strsql="Select yourfields from table where field =mystr"
me.listbox.rowsource= strsql

Damon
 
Assign the openargs value to a variable, then use the variable in a sql
string to make it the listbox's rowsource.
For example, (pseudo code)
mystr= me.openargs
strsql="Select yourfields from table where field =mystr"
me.listbox.rowsource= strsql

Damon






- Show quoted text -

Thanks Damon, problem solved
 
Back
Top