Run time error 3146 (1 Viewer)

jeo

Registered User.
Local time
Today, 16:26
Joined
Dec 26, 2002
Messages
299
I recently moved my Access tables to a SQL server.
I have been at this for a while now and can't seem to figure it out. On one of my forms I have a pretty large If statement that deals with DCount:
If DCount("ProjectStaffID", "qryAvailableDatesCheck", "(((Forms!frmProjectStaff!Start1 < Start1 Or Forms!frmProjectStaff!Start1 > End1) AND (Forms!frmProjectStaff!End1 < Start1 Or Forms!frmProjectStaff!End1 > End1))=False AND ((Forms!frmProjectStaff!FTE1 + FTE1) > 1) AND StaffID = Forms!frmProjectStaff!Combo2)") > 0 Then
MsgBox ("This person is already scheduled to work during this time period for full FTE. Please revise your dates and/or FTE."), vbOKOnly
Cancel = True
Command107.Visible = True
DoCmd.OpenReport "rptPersonCheckAvailability", acViewPreview

Ever since I moved my tables into SQL I'm getting this error:
run time error 3146, ODBC connection failed, Line1: Incorrect syntax near '='.(#170)
Any ideas what it could be and what I can do to fix it?
Thanks.
 

Users who are viewing this thread

Top Bottom