p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

sql_language thread: SQL 7 DCount problem is Access Project

Message #1 by "Terry Henson" <thccrs@a...> on Sun, 3 Mar 2002 06:03:45
SQL server does not like '!' characters from what I have learned, 

Just replace them with periods.
-----Original Message-----
From: Terry Henson [mailto:thccrs@a...] 
Sent: Sunday, March 03, 2002 6:04 AM
To: sql language
Subject: [sql_language] SQL 7 DCount problem is Access Project

Can't quite figure this one out.  This code works fine in Access and
However, in designing a SQL Server 7 application with a Access Project 
frontend, the code errors and I can't seem to figure this out.  

This code retrives a sepecific record from a list box and opens that 
record for the user.  It errors on the DCount line.  Any help is 
appreciated.  For some reason, SQL doesn't seem to like this.

stLinkCriteria = "[Case NO]=" & "'" & Me![List21] & "'"
If DCount("[Case NO]", "[CHP1]", "[Case NO]=Forms![PrintForm]![List21]")
0 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria



  Return to Index