Undefined function

  • Thread starter Thread starter GaryS
  • Start date Start date
G

GaryS

I am trying to use the first value out of a 2-column combo
box in the WHERE clause of a Make Table query:

. . . WHERE (((qss1LabelsToPrint.GardenID)=[Forms]!
[frmLabelPrinting: Select Garden]!
[comboSelectGarden].Column(0)));

When it runs, I get an Undefined Function error pointing
to the Column( part of the expression.

Is this only a syntax error? If so, what would be correct?

Or am I barking up the wrong tree in this approach? I'm
using a macro to execute this query via an OpenQuery
action; the macro is invoked in the After Update event for
the combo box.

(It seems that every time I try something new out, good
ol' Access slams me again! <whimper>)
 
this came up awhile back; i think the solution somebody
gave was to use the Eval() function in the query, as

= Eval("[Forms]!....")

personally, i usually just put an invisible, unbound
control on the form - named ShowColValue, for instance -
and set its' recordsource to

=[comboSelectGarden].Column(0)

then change the control reference in the query to

=[Forms]![frmLabelPrinting: Select Garden]![ShowColValue]

hth
 
Thanks, Tina. I tried the Eval function and it worked
right away. I haven't had a chance to try the unbound
text control ShowColValue approach as an alternative. Why
do you prefer the latter? Just curious!

Gary
-----Original Message-----
this came up awhile back; i think the solution somebody
gave was to use the Eval() function in the query, as

= Eval("[Forms]!....")

personally, i usually just put an invisible, unbound
control on the form - named ShowColValue, for instance -
and set its' recordsource to

=[comboSelectGarden].Column(0)

then change the control reference in the query to

=[Forms]![frmLabelPrinting: Select Garden]![ShowColValue]

hth

-----Original Message-----

I am trying to use the first value out of a 2-column combo
box in the WHERE clause of a Make Table query:

. . . WHERE (((qss1LabelsToPrint.GardenID)=[Forms]!
[frmLabelPrinting: Select Garden]!
[comboSelectGarden].Column(0)));

When it runs, I get an Undefined Function error pointing
to the Column( part of the expression.

Is this only a syntax error? If so, what would be correct?

Or am I barking up the wrong tree in this approach? I'm
using a macro to execute this query via an OpenQuery
action; the macro is invoked in the After Update event for
the combo box.

(It seems that every time I try something new out, good
ol' Access slams me again! <whimper>)
.
.
 
Eval() is probably better. it's just my bad; i've tried
using Eval() in VBA a couple times for various reasons,
and have had an awful time getting it to work - syntax
problems i think. so i'm gunshy. :)

-----Original Message-----

Thanks, Tina. I tried the Eval function and it worked
right away. I haven't had a chance to try the unbound
text control ShowColValue approach as an alternative. Why
do you prefer the latter? Just curious!

Gary
-----Original Message-----
this came up awhile back; i think the solution somebody
gave was to use the Eval() function in the query, as

= Eval("[Forms]!....")

personally, i usually just put an invisible, unbound
control on the form - named ShowColValue, for instance -
and set its' recordsource to

=[comboSelectGarden].Column(0)

then change the control reference in the query to

=[Forms]![frmLabelPrinting: Select Garden]![ShowColValue]

hth

-----Original Message-----

I am trying to use the first value out of a 2-column combo
box in the WHERE clause of a Make Table query:

. . . WHERE (((qss1LabelsToPrint.GardenID)=[Forms]!
[frmLabelPrinting: Select Garden]!
[comboSelectGarden].Column(0)));

When it runs, I get an Undefined Function error pointing
to the Column( part of the expression.

Is this only a syntax error? If so, what would be correct?

Or am I barking up the wrong tree in this approach? I'm
using a macro to execute this query via an OpenQuery
action; the macro is invoked in the After Update event for
the combo box.

(It seems that every time I try something new out, good
ol' Access slams me again! <whimper>)
.
.
.
 
Back
Top