Hi,
I have a command button with code behind it which retrieves data from an MS Access database and returns it to a worksheet using MS Query.The query retrieves data that is relevent to a specific date. If I edit my code and add the date that I want to use the query works fine.
What I am trying to do is by means of an input box the user to enter the date they wish to use in the query.
The code will then use the date entered into the variable to run the query. The code keeps crashing when it uses the variable.
When I revert to entering the date directly into the code it works fine again.
Could anyone tell me what I am doing wrong??
I have a command button with code behind it which retrieves data from an MS Access database and returns it to a worksheet using MS Query.The query retrieves data that is relevent to a specific date. If I edit my code and add the date that I want to use the query works fine.
What I am trying to do is by means of an input box the user to enter the date they wish to use in the query.
The code will then use the date entered into the variable to run the query. The code keeps crashing when it uses the variable.
When I revert to entering the date directly into the code it works fine again.
Could anyone tell me what I am doing wrong??