Simple DAP Syntax Question

  • Thread starter Thread starter Pat
  • Start date Start date
P

Pat

Hi... I am trying to design my first Data Access Page in MS
Access XP and I have a really simple syntax question. I
need to know the proper syntax for Microsoft Script for the
following:

Ser = chr(34) & "LogicalCubeName=" & LogicalCubeName.value
& chr(34)

This script works perfectly well to link a simulated
SubForm to the Main Form but ONLY IF LogicalCubeName is a
Numeric Data Type. What, however, is the proper syntax if
LogicalCubeName is a String? In VBA it would be very
simple, add the additional 1/2 quote marks:

Ser = chr(34) & '"LogicalCubeName="' &
LogicalCubeName.value & chr(34)

but when I try this syntax, LogicalCubeName becomes Green
similar to if I am trying to 'nest' a comment.

Can someone assist me with this real simple question?

Thanks

Pat
 
As you have said, on SQL-Server you must enclose strings with single quote,
not with double quote. The problem with your example is that your putting
your single quotes around the variable name and not around the string value.

Instead, write something like:

Ser = chr(34) & "LogicalCubeName='" & LogicalCube.Name & "'" & chr(34)

S. L.
 
Back
Top