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

SQL 7 DCount error in Access Project

Status
Not open for further replies.

heehaw

Programmer
Mar 2, 2002
11
0
0
US
This code works fine in Access and VBA, however, in an Access Project connected to SQL 7 it errors on the DCount line. I'm stumped and need help of advice why this errors.

The code is designed to select a sepecif record from a list box and show it to the user.

Any help is appreciated.

Dim stDocName As String

Dim stLinkCriteria As String

stDocName = "901"

stLinkCriteria = "[Case NO]=" & "'" & Me![List21] & "'"
If DCount("[Case NO]", "[CHP1]", "[Case NO]=Forms!_[PrintForm]![List21]") > 0 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
MsgBox "Face Page of Your Report is Open"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top