A
Afrosheen via AccessMonster.com
Thanks for reading this. Could you please check out this SQL statement. I
copied and pasted it in to a routine I'm trying to do. When I checked it out
IN the query it worked ok starting with the Select. In the positions of
tblTaps.Workplan= is a variable string that the user has to enter by combo
box on a form. The tblMain.Supervisor= is another variable string from a
combo box. The ultimate goal is to produce a report. On the query its self
when I put in January for the WorkPlan and Tom for the supervisor it works
great. When I try the input method it comes up with a syntax error. So
probably I'm missing something or something is in the wrong location.
strWhere = "SELECT tblTaps.StaffId, tblMain.Lname, tblMain.Fname, tblTaps.
WorkPlan, tblTaps.WorkRec, tblTaps.IntDue, tblTaps.IntRec, tblTaps.FinalDue,
tblTaps.FinalRec, tblTaps.RatingCyc, tblTaps.FiscalYr, tblTaps.Rating,
tblTaps.Notes, tblTaps.Archive, tblTaps.DateAch, tblMain.IdPict, tblMain.
Supervisor, tblMain.Location" _
& "FROM tblMain INNER JOIN tblTaps ON tblMain.StaffId = tblTaps.StaffId" _
& "WHERE (((tblTaps.WorkPlan)="""& me.combo149&""") AND ((tblTaps.Archive)
=False) AND ((tblMain.Supervisor)="""&me.cboloc&"""))"
Thanks for helping me out.
copied and pasted it in to a routine I'm trying to do. When I checked it out
IN the query it worked ok starting with the Select. In the positions of
tblTaps.Workplan= is a variable string that the user has to enter by combo
box on a form. The tblMain.Supervisor= is another variable string from a
combo box. The ultimate goal is to produce a report. On the query its self
when I put in January for the WorkPlan and Tom for the supervisor it works
great. When I try the input method it comes up with a syntax error. So
probably I'm missing something or something is in the wrong location.
strWhere = "SELECT tblTaps.StaffId, tblMain.Lname, tblMain.Fname, tblTaps.
WorkPlan, tblTaps.WorkRec, tblTaps.IntDue, tblTaps.IntRec, tblTaps.FinalDue,
tblTaps.FinalRec, tblTaps.RatingCyc, tblTaps.FiscalYr, tblTaps.Rating,
tblTaps.Notes, tblTaps.Archive, tblTaps.DateAch, tblMain.IdPict, tblMain.
Supervisor, tblMain.Location" _
& "FROM tblMain INNER JOIN tblTaps ON tblMain.StaffId = tblTaps.StaffId" _
& "WHERE (((tblTaps.WorkPlan)="""& me.combo149&""") AND ((tblTaps.Archive)
=False) AND ((tblMain.Supervisor)="""&me.cboloc&"""))"
Thanks for helping me out.