The first is the right logic, but fails. The second is the wrong logic but runs.
strSQL = "SELECT * FROM MyTable"
rstRecordsCursorType = adOpenStatic
rstRecords.CursorLocation = adUseClient
rstRecords.Open strSQL, CurrentProject.Connection
This filter is the correct logic. Only the dates on the 10th and number column can be either 10 or 12. This however throws an error "Arguments are the wrong type, out of acceptable range or in conflict with one another."
rstRecords.Filter = "DateCol = #07/10/2011# AND (NumCol1 = 10 OR NumCol2 = 12)"
By removing the parenthesis access will allow this filter but its the wrong logic, the results aren't what they need to be.
rstRecords.Filter = "DateCol = #07/10/2011# AND NumCol1 = 10 OR NumCol2 = 12"
I have tried several different ways. The first filter works fine with DAO but I am switching to an SQl server and migrating everything to ADO. This seems like a simple problem but its turning int a big headache.
Thanks for the help.
strSQL = "SELECT * FROM MyTable"
rstRecordsCursorType = adOpenStatic
rstRecords.CursorLocation = adUseClient
rstRecords.Open strSQL, CurrentProject.Connection
This filter is the correct logic. Only the dates on the 10th and number column can be either 10 or 12. This however throws an error "Arguments are the wrong type, out of acceptable range or in conflict with one another."
rstRecords.Filter = "DateCol = #07/10/2011# AND (NumCol1 = 10 OR NumCol2 = 12)"
By removing the parenthesis access will allow this filter but its the wrong logic, the results aren't what they need to be.
rstRecords.Filter = "DateCol = #07/10/2011# AND NumCol1 = 10 OR NumCol2 = 12"
I have tried several different ways. The first filter works fine with DAO but I am switching to an SQl server and migrating everything to ADO. This seems like a simple problem but its turning int a big headache.
Thanks for the help.