String in expression is being treated as a parameter?

Johnny C

Registered User.
Local time
Today, 01:32
Joined
Feb 17, 2014
Messages
19
This has got me scratching my head, am I missing something really stupid?

I've got a query. One field is an expression on which I'm filtering.

A shortened version of the expression is
Expr1: IIf([Status]=”Active”,"Yes","No")

There are other parts to the formula, hence why I'm not filtering [Status] itself, but stripping them out gives the same problem.
I'm filtering on "Yes"

What is happening is when I close the Expression builder, it changes "Active" to a parameter, thusly:-

Expr1: IIf([Status]=[”Active”],"Yes","No")

Status is a text field, it's a query on a single table, there's no field called Active, so I can't for the life of me figure out why.

What am I doing wrong?
 
Why is there a different double quotes? use " not , yes they are different.

Asc("""") -> 34 but Asc("”") = 148
 
Thanks, sorted!

That's just weird. I had a query which I copied to Word to amend (my eyesight struggles with lots of brackets of various types in expression builder) and word has added the odd quotes. There's only one " button on my keyboard, so why Word is just adding the wrong ones I don't know.

Seeing as it's Microsoft though it doesn't surprise me, it's a bit of a challenge to have the same key on a keyboard adding the same Ascii code on different programs in an integrated suite like Office. It's no wonder you can't copy UK format dates between Access and Excel.
 
I had a query which I copied to Word to amend (my eyesight struggles with lots of brackets of various types in expression builder)
I would suggest you use a Programmer's must have tool : NotePad++

This text editor is simply the best, helps you identify where brackets end, if you save it as a VB file then you can even find color coded statements. Simply the best ! Good luck !
 

Users who are viewing this thread

Back
Top Bottom