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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

66 99

Status
Not open for further replies.

kingz2000

Programmer
May 28, 2002
304
DE
Hi,

I am dynamically changing my Query using VBA Code, and I came accross a problem, which I hope you can help out on:

my SQL need to read:
select Apples & "/" & Pears as Fruits from Table

NOw in my code I have

dim StrSQL as string
strSQL = "select Apples & "/" & Pears as Fruits from Table"

Naturally, the speech marks get in each others way.How do I get around this???
 



Hi,
Code:
strSQL = "select Apples" & "/" & "Pears as Fruits from Table"


Skip,

[glasses] [red][/red]
[tongue]
 




Code:
strSQL = "select Apples &'/'& Pears as Fruits from Table"


Skip,

[glasses] [red][/red]
[tongue]
 
Code:
Dim myExactFieldName As String

myExactFieldName = "Apples &" & Chr(34) & " / " & Chr(34) & "Pears"
strSQL = "SELECT [" & myExactFieldName  & "] As Fruits FROM Table"
Nice name you 've got there! Do you think you should change it ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top