Ok...3rd post in 2 days...my errors seem to never stop coming. Can anyone see what I've done wrong. I know it's this line of code because if I comment it out...all other parts of the code work fine. Only when I set this line to run will the program screw up. The error I'm getting is:
Here's the code.
What I've done is I'm creating an SQL string based on whether or not the user has chosen a field to be added to the query by checking a check box. This code is just the part for adding the criteria for BIRTHDATE to the WHERE Statement.
"ws" is the WHERE STATEMENT
I'd give you the whole code, but it's pretty long and it all works. So I know the code that is messed up has to be here. That's why the error baffles me...because it doesn't sound like it has to do with any of my code formating for this line. But trust me it's this line of code that is stopping the program.
Any help would be greatly appreciated.
~Snay
Run Time Error '2001':
You cancelled the previous operation
Here's the code.
Code:
ws = ws & " AND ((MEMBERtbl.BIRTHDATE) BETWEEN '" & [Forms]![CREATEQUERYfrm]![CREATEQUERYSUBfrm]![BIRTHDATEx] & "' AND '" & [Forms]![CREATEQUERYfrm]![CREATEQUERYSUBfrm]![BIRTHDATEy] & "')"
What I've done is I'm creating an SQL string based on whether or not the user has chosen a field to be added to the query by checking a check box. This code is just the part for adding the criteria for BIRTHDATE to the WHERE Statement.
"ws" is the WHERE STATEMENT
I'd give you the whole code, but it's pretty long and it all works. So I know the code that is messed up has to be here. That's why the error baffles me...because it doesn't sound like it has to do with any of my code formating for this line. But trust me it's this line of code that is stopping the program.
Any help would be greatly appreciated.
~Snay