By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,689 Members | 1,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,689 IT Pros & Developers. It's quick & easy.

complex expression builder

P: n/a
Hi,

I want to use the expression builder in a query to define a field. I
know how to do it for simple fields, like the one below :

orderdate: IIf((IsNull([verification simulator]) And [verified]=False)
Or ([verification simulator]<>"N/A" And [verified]=False),[ver
date],[start date])

When though the expression is too complex, the builder is not very
convenient to use. I tried to use a function instead... The error I
get is "External name not defined". I suppose I get that because I
input the fields as you do in the builder i.e. not defining the
form(?) they come from.

I tried to use Me!, but again I get an error...

What's the best way to takle this?

Thank you in advance

Laertes
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You say that you tried to use a function. Where did you place this function
and how did you call it? Did you create a "user defined function"? You are
correct, "Me" won't work in SQL, but you can give the full path to the form
instead.

Change Me!txtMyTextbox
to Forms!frmMyForm!txtMyTextbox

However, if you are trying to concatenate a value from a form into SQL being
defined in code, you can use "Me!" in the code, because it will actually be
replaced by the concatenation with the actual value. So the SQL will have
the value in it, not the "Me!".

--
Wayne Morgan
Microsoft Access MVP
"Laertes" <bi******@btopenworld.com> wrote in message
news:b2**************************@posting.google.c om...
Hi,

I want to use the expression builder in a query to define a field. I
know how to do it for simple fields, like the one below :

orderdate: IIf((IsNull([verification simulator]) And [verified]=False)
Or ([verification simulator]<>"N/A" And [verified]=False),[ver
date],[start date])

When though the expression is too complex, the builder is not very
convenient to use. I tried to use a function instead... The error I
get is "External name not defined". I suppose I get that because I
input the fields as you do in the builder i.e. not defining the
form(?) they come from.

I tried to use Me!, but again I get an error...

What's the best way to takle this?

Thank you in advance

Laertes

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.