Dashes are causing problems retrieving data

Jeigh

New member
Local time
Today, 01:40
Joined
Aug 1, 2006
Messages
5
I have a database with a series of fields, all set to a String datatype, that I want to be able to fill and then use with MS Word as a mail merge data source. This function lets you query a MS Access db and use the results to fill in predefined spots attached to the various data values in the table. This is great for my needs however a large percentage of times that I have a dash in the value being queried it does not return any results. For example, 01-01 would return no entry found even though I can clearly see it in the database, however it would work fine if I queried for 0101 or any other value in the given field.

Basically I'm trying to figure out why dashes would cause problems. They are obviously fine for being stored in the access database and don't cause any troubles until they are queried for, also retrieving data containing dashes is fine so long as that value is not the one being queried for.

I basically can't avoid the dashes in the data for this setup and as such hopefully can figure out why this happens and how to get around it. Thanks for any help offered.
 
If you want to query for 01-01 then you will need to put quotes around it as it is a string ("01-01") and if you don't it assumes you are saying 1 minus 1.
 

Users who are viewing this thread

Back
Top Bottom