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

String problem

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
I want to pass a string command into MS Access using DDE. This I can do easily.

How ever te string I want to use is:

OpenForm "Section38 Current", acNormal, "", "[Section38 Current]![Road Name Rd1]=""Oberon Road""", , acNormal

But VB doesn't like this as a string. How would I rewrite it so VB will treat it like a string?
 
You can replace some of your quotations with Chr(34). This is the ascii character code. You will have to concantenate the character call in to the string but it should work.

By using the character call you will avoid all the expected end of statement errors you are probally getting.

OpenForm "Section38 Current", acNormal, "", "[Section38 Current]![Road Name Rd1]= & chr(34) & 'Oberon Road' & chr(34) & '"', , acNormal

I am not sure if this is entirely correct, but you get the idea.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top