Right now I have this code:
Dim adapter As New OleDbDataAdapter("Select 1stShift as [First Shift] from &_
EmployeeDesignation where EmployeeID= '" & empID & "' and &_
DesignationDate= '" & day & "'", DBConnection)
I get an error "Syntax error (missing operator) in query expression '1stShift'."
But if I change 1stShift to EmployeeID, or DesignationDate, which are both "Text" fields, it works just fine.
Please enlighten me. Thank you!
assuming 1stShift is a valid column name this should work
Dim adapter As New OleDbDataAdapter("Select [1stShift] as [First Shift] from " &_
"EmployeeDesignation where EmployeeID= '" & empID & "' and "&_
"DesignationDate= '" & day & "'", DBConnection)