Expression Builder bug causing #Name errors

G

Guest

Want to know if anyone else have run into the following issue:

In Expression Builder, if I choose absolute field references, that is,
table!field, or query!field, it writes it this way:

=
![field]

or

= [query]![field]

If you simply use it, it will give you the dreaded #Name error. Mind you, I
simply choose the fields. I DID NOT TYPE THEM MYSELF.

If I correct the examples above manually, as shown below,

= [table!field]

or

= [query!field]

the expressions work like a charm.

Is this a known bug of Expression Builder?

I would appreciate your feedback.
 
K

Ken Snell \(MVP\)

Quite honestly , I never use the Expression Builder, preferring to build my
own expressions. But, after you get the result from the Expression Builder,
change the ! to a . character.

This assumes, of course, that your form or report contains the field that
you're using in your expression.
 
G

Guest

Ken, thanks for your post.

Please excuse my ignorance. What you're saying is that

= [table/query].[field]

is actually a valid entry? I'll try it out, anyway. And yes, my form does
contain the field in question. That's why it took me about an hour and a
half to figure out what was going on, and get a workaround.

P.S.: Have not used VBA yet, and in fact, I'm quite new to MS Access, SQL
and VBA. However, I have both knowledge and experience with databases and
their programming in other languages back from the MS-DOS era. It is one of
my goals this year to become proficient and more involved in programming (OK,
developing) database applications, and get my MCDBA in the process. Just so
that you know I'm both a newbie and an old hand. Pretty odd place to be,
mind you!


Ken Snell (MVP) said:
Quite honestly , I never use the Expression Builder, preferring to build my
own expressions. But, after you get the result from the Expression Builder,
change the ! to a . character.

This assumes, of course, that your form or report contains the field that
you're using in your expression.

--

Ken Snell
<MS ACCESS MVP>

LAMP90 said:
Want to know if anyone else have run into the following issue:

In Expression Builder, if I choose absolute field references, that is,
table!field, or query!field, it writes it this way:

=
![field]

or

= [query]![field]

If you simply use it, it will give you the dreaded #Name error. Mind you,
I
simply choose the fields. I DID NOT TYPE THEM MYSELF.

If I correct the examples above manually, as shown below,

= [table!field]

or

= [query!field]

the expressions work like a charm.

Is this a known bug of Expression Builder?

I would appreciate your feedback.
 
K

Ken Snell \(MVP\)

Yes, the proper syntax is

Tablename.Fieldname

or

Queryname.Fieldname

At least now I know why so many people post questions that show ! in these
expressions -- that apparently is what the Expression Builder creates.

Good luck!

--

Ken Snell
<MS ACCESS MVP>

LAMP90 said:
Ken, thanks for your post.

Please excuse my ignorance. What you're saying is that

= [table/query].[field]

is actually a valid entry? I'll try it out, anyway. And yes, my form
does
contain the field in question. That's why it took me about an hour and a
half to figure out what was going on, and get a workaround.

P.S.: Have not used VBA yet, and in fact, I'm quite new to MS Access, SQL
and VBA. However, I have both knowledge and experience with databases and
their programming in other languages back from the MS-DOS era. It is one
of
my goals this year to become proficient and more involved in programming
(OK,
developing) database applications, and get my MCDBA in the process. Just
so
that you know I'm both a newbie and an old hand. Pretty odd place to be,
mind you!


Ken Snell (MVP) said:
Quite honestly , I never use the Expression Builder, preferring to build
my
own expressions. But, after you get the result from the Expression
Builder,
change the ! to a . character.

This assumes, of course, that your form or report contains the field that
you're using in your expression.

--

Ken Snell
<MS ACCESS MVP>

LAMP90 said:
Want to know if anyone else have run into the following issue:

In Expression Builder, if I choose absolute field references, that is,
table!field, or query!field, it writes it this way:

=
![field]

or

= [query]![field]

If you simply use it, it will give you the dreaded #Name error. Mind
you,
I
simply choose the fields. I DID NOT TYPE THEM MYSELF.

If I correct the examples above manually, as shown below,

= [table!field]

or

= [query!field]

the expressions work like a charm.

Is this a known bug of Expression Builder?

I would appreciate your feedback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top