Simple DAP Syntax Question

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
 
S

Sylvain Lafontaine

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top