Syntax in MS Query

Ally

Registered User.
Local time
Today, 00:04
Joined
Sep 18, 2001
Messages
617
Hi All

Not been around for a while but I'm back!!

I'm using MS Query as an external data source for an Excel spreadsheet.

On inputting <> 'Inter Hospital Transfer' as criteria under a certain field in MS Query, I thought I would be asking it to exclude Inter Hospital Transfer from the returned data. But it's somehow excluding loads of other data.

To check to see just to see how many records we're expecting it to exclude, I took out the <> and it only returns a handful which is correct. So I'm guessing that the syntax is wrong.

Does anyone know what to do please? I've searched high and low on the internet and can find very limited help on this and the help files within MS Query tell you the wrong thing (such as using double quotes as you would in a normal Access query instead of single quotes).

Thanks

Ally
 
if you change it to = "inter ..." do you only get the ones listed?
 
Hi David

Thank you for replying. Yes, that was what I meant by taking out the <> - and it does just return the few that we expected.
 
I believe I know what it is now! I have to include Is Null otherwise, it's excluding all the records that are null in that field. Bit weird as I've only told it not to include one particular thing but at least I know what it is!

Cheers

Ally
 

Users who are viewing this thread

Back
Top Bottom