Am I imagining things?!

samehkh

Registered User.
Local time
Today, 10:01
Joined
Aug 11, 2003
Messages
63
It is my first time to play with Access 2002.
I programmed Access 2.0 through 2000.
In the past, some function calls used to have different syntax in modules than in form, report, and query expressions, like

IIf(condition,truepart,falsepart) , in modules

as opposed to
IIf(condition;truepart;falsepart) in forms,etc

This was a source of many errors and frustration. Is it a new feature in Access2002 or am I imagining things :) ??
 
Say what?

First, I've never used IIf() with semicolons like you wrote. I don't know if it's valid, but if it works....

Second, IIf() is an Access function, and you can use it in a module to evaluate an expression like any other function. Are you confusing it with the If...Then....End If structure?

I think all of these have been available since Access 2.0.
 
I think this may come about in Countries that use commas as decimal separators, at least that seems to be the opinion of a Portuguese friend of mine. Have a look at the regional settings and please let us know what you find.

Regards
Chris
 
My regional settings is English (Canada).

I am not having a problem, because now it is really much better having the same syntax (comma being the separator) all over the application, but I remember before when I tried to re-use some expressions or code fragments and I had to modify the separators in functions like IIF() and Dlookup() ,...etc according to where I was embedding them.
I think I have read the "What's new in access 2002" and I am surprised that such improvement is not documented unless..........I am imagining things :)
 
ChrisO your friend was absolutely right!!

Guess what. When I changed my regional settings to the setting I used before coming to Canada, this piece of code:

=DLookUp("[Transactions]![Document]","transactions"," [Transactions]![TransactionID] = [TransactionCode] ")

Automatically changed to

=DLookUp("[Transactions]![Document] ";"transactions";" [Transactions]![TransactionID] = [TransactionCode] ")
and each is working fine on its own regional setting.

This semicolon thing, along with the nasty syntax of the Dlookup function (having to enclose field names in double quotes and such) used to give me a lot of headache, with the expression builder even refusing to open to allow me to correct the error, that I had to scroll through the control and edit its properties right there, in the property sheet.

Thanx for your tip.
 
Last edited:
Thanks for the feedback and confirmation.

My Portuguese friend is usually correct and it happens in Holland too, as far as I know.

I can only imagine what happens when they down load code samples as it could very well blow up on compile.

Again, thanks for the feedback.

Regards
Chris
 
Thanks Mailman…I think you were the Dutch connection. ;)

Regards
Chris
 

Users who are viewing this thread

Back
Top Bottom