|
-
Oct 18th, 2005, 12:55 AM
#1
Thread Starter
Member
Data Type Mismatch
Hi,
I am facing problems in doing this:
I have an access query that is query using linked tables to SQL server. My sql table has a field called ImportDate with datatype date/time and its sample value is like: 10/18/2005 11:56:36 AM
I have now an access query which has to gather records from this table only based upon the ImportDate specified by the user. I have built a form for this purpose. In the access design query I added another another column with criteria [Forms]![QueryForm2]![singleDate]. singleDate is the name of the textbox control that contains the import date inputted by the user and QueryForm2 is the name of my form.
Now the problem, if I enter in the text field 10/18/2005 11:56:36 AM and click on RunQuery, I am returned a blank query with no records shown (though I know there is). Someone mentioned to me that the date should be in the format #10/18/2005 11:56:36 AM#. When I type this in the text field, I get a weird message saying "You cancelled the previous operation". For further debugging, I went to the design query and changed the criteria from [Forms]![QueryForm2]![singleDate] to #10/18/2005 11:56:36 AM# and ran the query. Then I got an error message saying "Syntax Error converting Date Time to Character String"
I am really tensed. Any help would be gladly accepted. Thanks
When you know you can do it, there is no power on earth that can stop you. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|