proper way to refer to listbox

  • Thread starter Thread starter learning
  • Start date Start date
L

learning

I am trying to refer to a list box on a sub form. It seems that I have
tried every combination to refer to the list box, but i keep getting the
error that access cant find the "field" refered to in my expression. it
names the listbox, so I assume thats what it cant find.

Obviously I havent tried the correct way to refer to the list box as a
variable in a function called "after update" ? How am I supposed to do that
 
this is typed in as a variable as a string, so I put quotes around the
example you gave using brackets? with the brackets and no quotes, there is
an error about an unreconized macro or function. with the quotes, it say
the listbox cant be found.

The function runs fine if i just run the subform by itself, (and just enter
"lstboxname" as the variable string) but as a subform, I keep getting these
errors.


KARL DEWEY said:
[Forms]![MainFormName]![SubformName]![ListboxName]

learning said:
I am trying to refer to a list box on a sub form. It seems that I have
tried every combination to refer to the list box, but i keep getting the
error that access cant find the "field" refered to in my expression. it
names the listbox, so I assume thats what it cant find.

Obviously I havent tried the correct way to refer to the list box as a
variable in a function called "after update" ? How am I supposed to do that
 
I do not know where you are putting it. I assumed it was criteria for a
query.

learning said:
this is typed in as a variable as a string, so I put quotes around the
example you gave using brackets? with the brackets and no quotes, there is
an error about an unreconized macro or function. with the quotes, it say
the listbox cant be found.

The function runs fine if i just run the subform by itself, (and just enter
"lstboxname" as the variable string) but as a subform, I keep getting these
errors.


KARL DEWEY said:
[Forms]![MainFormName]![SubformName]![ListboxName]

learning said:
I am trying to refer to a list box on a sub form. It seems that I have
tried every combination to refer to the list box, but i keep getting the
error that access cant find the "field" refered to in my expression. it
names the listbox, so I assume thats what it cant find.

Obviously I havent tried the correct way to refer to the list box as a
variable in a function called "after update" ? How am I supposed to do that
 
I have a function that populates the listbox from a table. I'm putting it
in as one of the variables when calling the function.

KARL DEWEY said:
I do not know where you are putting it. I assumed it was criteria for a
query.

learning said:
this is typed in as a variable as a string, so I put quotes around the
example you gave using brackets? with the brackets and no quotes, there is
an error about an unreconized macro or function. with the quotes, it say
the listbox cant be found.

The function runs fine if i just run the subform by itself, (and just enter
"lstboxname" as the variable string) but as a subform, I keep getting these
errors.


KARL DEWEY said:
[Forms]![MainFormName]![SubformName]![ListboxName]

:

I am trying to refer to a list box on a sub form. It seems that I have
tried every combination to refer to the list box, but i keep getting the
error that access cant find the "field" refered to in my
expression.
it
names the listbox, so I assume thats what it cant find.

Obviously I havent tried the correct way to refer to the list box as a
variable in a function called "after update" ? How am I supposed to
do
that
 
Back
Top