Re: Simple Question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



If the field you are applying criteria is a number field then no quotes
should be used.
If the field is a text field that contains numeric characters then quotes
should be used.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Novice2000" <Novice2000@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7293AC5F-75CF-48C7-9972-39BA6178B687@xxxxxxxxxxxxxxxx
Hi,

I just had to fix a query my boss was writing. I guessed the answer
correctly, but I really don't know why it is so. There were two query
items
with criteria. One had letters like ACR, BLP, etc. and the others were
code
numbers.

The criteria were phrased like this: "ACR" Or "BLP" and "1" Or "2" Or
"3".

All I did was remove the quotation marks from the numbers and the query
works fine. Can anyone tell me why? Shouldn't quotation marks be placed
around numbers?


.



Relevant Pages

  • Re: Removing quotation marks
    ... > query that gets rid of the quotation marks? ... Create an Update Query. ... With spaces added for clarity only, the quotes are as follows: ...
    (microsoft.public.access.queries)
  • Re: how to link to a csv file with a date field in it?
    ... Regarding the scheduler it's in XP and above - if you aren't familiar with using the Windows Task Scheduler, here is a link to a fairly clean, simple, short tutorial. ... I think you have the right idea - link to the csv, maybe run an append query to process the contents into your main table, in that query you can fix things such as the date. ... s is the complete row of data as a string, flag is a boolean that is initialized to be False. ... The full code I snipped this from contains so much checking for quotes and # hashes and internal commas and internal single quotes replacing certain chars, that it's difficult for me to follow and I wrote it. ...
    (microsoft.public.access.externaldata)
  • Re: how to link to a csv file with a date field in it?
    ... I think you have the right idea - link to the csv, maybe run an append query to process the contents into your main table, in that query you can fix things such as the date. ... s is the complete row of data as a string, flag is a boolean that is initialized to be False. ... We can create a recordset object and set it to a specific table - we add the new row one field at a time, testing each field for type using a select case, add the # for dates or ' for text or nothing for numeric field types to the fldArrrayelement contents and the set rs.fields= the resulting expression. ... The full code I snipped this from contains so much checking for quotes and # hashes and internal commas and internal single quotes replacing certain chars, that it's difficult for me to follow and I wrote it. ...
    (microsoft.public.access.externaldata)
  • Aging Function
    ... I took your advice and the query worked! ... total debits for those accounts, ... >problem with using the accounts as criteria. ... >it was a result of the missing single quotes. ...
    (microsoft.public.access.modulesdaovba)
  • pop-up form to filter report
    ... when writing sql code use double quotes to ... denote the sql query text and single quotes for string ... John is right about the need to lose the ...
    (microsoft.public.access.reports)