Query criteria

S

SF

Hi,

I want to export an existing query (Province Name, District name, Commune
Name) based on the selected value in the list box. I create a criteria
string


Dim stgSQL As String
Dim varItem As Variant

gstrQueryFilter = "'"
For Each varItem In Me.listProvince.ItemsSelected
gstrQueryFilter = gstrQueryFilter & Me.listProvince.ItemData(varItem) &
"' OR '"
Next varItem

gstrQueryFilter = "LIKE " & Left(gstrQueryFilter, Len(gstrQueryFilter) - 5)


How can I use the Criteria with query? (in form, docmd.openform
"formname",,,,,)

SF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top