M
Martin
I need help in using the proper double quotation in a defined text string.
This code is based in a previous response on limiting content of one combo
box from what's selected in a another combo box. I already made one combo box
work on a simple query, but here I got some complexity since I need to add an
expression in my limited knowledge on using single and double quotations is
not helping my find the correct way to write it.
Dim strSQL1 as String
strSQL1 = "SELECT [Unit-State].Unit, [Unit-State].State FROM [Unit-State]"
strSQL1 = strSQL1 & " WHERE ((([Unit-State].State)=IIf(" & Me![GasTypeCode]
strSQL1 = strSQL1 & "=Vac Or " & Me![Combo1]
strSQL1 = strSQL1 & "=PVac,PV,P))) ORDER BY [Unit-State].Unit;"
Me!Combo1.RowSource = strSQL1
I want to limit that whenever Me!Combo1 is "Vac" or "PVac", my query
criteria is filtered by "PV", otherwise my query criteria should be filtered
by "P"
Thanks.
This code is based in a previous response on limiting content of one combo
box from what's selected in a another combo box. I already made one combo box
work on a simple query, but here I got some complexity since I need to add an
expression in my limited knowledge on using single and double quotations is
not helping my find the correct way to write it.
Dim strSQL1 as String
strSQL1 = "SELECT [Unit-State].Unit, [Unit-State].State FROM [Unit-State]"
strSQL1 = strSQL1 & " WHERE ((([Unit-State].State)=IIf(" & Me![GasTypeCode]
strSQL1 = strSQL1 & "=Vac Or " & Me![Combo1]
strSQL1 = strSQL1 & "=PVac,PV,P))) ORDER BY [Unit-State].Unit;"
Me!Combo1.RowSource = strSQL1
I want to limit that whenever Me!Combo1 is "Vac" or "PVac", my query
criteria is filtered by "PV", otherwise my query criteria should be filtered
by "P"
Thanks.