Good Day,
I am writhing a module which requires a line of 2 of code querying on 2 fields. I am fine with the query on 1 field but is having some challenges on the 2. I would be grateful for some assistance. Here is the working code:
Dim curDatabase As dao.Database
Dim rs As dao.Recordset
Dim rs1 As dao.Recordset
Set curDatabase = CurrentDb
Set rs = CurrentDb.OpenRecordset("Select * from [tblSignin] WHERE tblSignin.[OfficerName]='" & Form_frmSignin.txtUser & "'")
This is the non working code:
Set rs = CurrentDb.OpenRecordset("Select * from [tblSignin] WHERE tblSignin.[OfficerName]='" & Form_frmSignin.txtUser & "'" & tblSignin.[Auto Date and Time Entry]='" & Form_frmSignin.txtUser2 )
I am writhing a module which requires a line of 2 of code querying on 2 fields. I am fine with the query on 1 field but is having some challenges on the 2. I would be grateful for some assistance. Here is the working code:
Dim curDatabase As dao.Database
Dim rs As dao.Recordset
Dim rs1 As dao.Recordset
Set curDatabase = CurrentDb
Set rs = CurrentDb.OpenRecordset("Select * from [tblSignin] WHERE tblSignin.[OfficerName]='" & Form_frmSignin.txtUser & "'")
This is the non working code:
Set rs = CurrentDb.OpenRecordset("Select * from [tblSignin] WHERE tblSignin.[OfficerName]='" & Form_frmSignin.txtUser & "'" & tblSignin.[Auto Date and Time Entry]='" & Form_frmSignin.txtUser2 )