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!

Compile Error in VB Select Query 1

Status
Not open for further replies.

BV874

Technical User
Nov 23, 2009
33
0
0
US
Hello Everyone,
I am receiving a compile error on the following code for method or data member not found. Any help would be greatly appreciated. Thanks!


Dim Mysql As String
Dim RS As Recordset
Mysql = "Select [CountOfCUS_NUM] from [tblUploadDuplicates]"
RS.Open Mysql, CurrentProject.Connection
RS.MoveFirst

If RS.Fields([CountOfCUS_NUM]) > 0 Then
MsgBox "The file you are attempting to upload has already been processed", vbCritical + vbOKOnly, "ERROR!"
Cancel = True
Exit Sub
End If
 
If RS.Fields([!]"[/!][CountOfCUS_NUM][!]"[/!]) > 0 Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top