Hey guys I just joined up a few days ago in anticipation of having some problems doing an access project for school and I'm finally stuck. Not a very complex problem I just don't know the syntax. Here is my code.
Dim stra As String
stra = "Aide"
Comn1.RowSource = "Select tblemployees.Firstname & ' ' & tblemployees.lastname " & _
"FROM tblemployees " & _
"WHERE tblEmployees.Position <> '" & stra & "'" & _
"ORDER BY tblemployees.lastname;"
This works fine but i need one more contstraint in the WHERE line and don't know how to write in an AND statement with VBA. I'v bolded the line where I need another constraint.
Thanks in advance guys
Dim stra As String
stra = "Aide"
Comn1.RowSource = "Select tblemployees.Firstname & ' ' & tblemployees.lastname " & _
"FROM tblemployees " & _
"WHERE tblEmployees.Position <> '" & stra & "'" & _
"ORDER BY tblemployees.lastname;"
This works fine but i need one more contstraint in the WHERE line and don't know how to write in an AND statement with VBA. I'v bolded the line where I need another constraint.
Thanks in advance guys