Hi Everyone,
I'm trying to import data from Access to Excel with multiple criterias using DAO. I got this code (at least the lines I'd like to modify) from the internet:
Set rs = DB.OpenRecordset("SELECT * FROM " & _
TableName & " WHERE " & FieldName & _
" = 'MyCriteria'", dbReadOnly) ' filter records
I can't seem to modify this line where in I can refer to at least 2 criterias instead of 1 (MyCriteria).
The criterias I'm using is a range of date.
Thanks in advance!
I'm trying to import data from Access to Excel with multiple criterias using DAO. I got this code (at least the lines I'd like to modify) from the internet:
Set rs = DB.OpenRecordset("SELECT * FROM " & _
TableName & " WHERE " & FieldName & _
" = 'MyCriteria'", dbReadOnly) ' filter records
I can't seem to modify this line where in I can refer to at least 2 criterias instead of 1 (MyCriteria).
The criterias I'm using is a range of date.
Thanks in advance!