Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding " " to the value from a combo 1

Status
Not open for further replies.

UongSaki

Technical User
Nov 15, 2003
65
US

How do I change this statement

If CheckDivison Then
strWHERE = strWHERE & "D.Divisions = " & (ComboDivision)
End If

so that my SQL result is

SELECT D.*
FROM TblFinalData AS D
WHERE D.Divisions = "All CMP";

and NOT this

SELECT D.*
FROM TblFinalData AS D
WHERE (((D.Divisions)=All [CMP]));


Thanks,

UongSaki
 

Code:
If CheckDivison Then
    strWHERE = strWHERE & "D.Divisions = " & _
    Replace(Replace(ComboDivision, "[", ""), "]", "")
End If

*cLFlaVA
----------------------------
Ham and Eggs walks into a bar and asks, "Can I have a beer please?"
The bartender replies, "I'm sorry, we don't serve breakfast.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top