Display content of one listbox based upon the selected item of ano

W

Wendy

I have two list boxes (unbound), based on the item selected in one list box I
would like to display content in another.
I am unable to use something like this in the underlying query/filter of the
2nd list box Forms![FrmAssignChoices]![lstActivity].column(1).

I know this is simple for you folk out there.

Many thanks

Wendy
 
J

Jeff Boyce

Wendy

Is there a chance that what you have in the second column of the first
listbox is NOT what you want to use for the criteria/filter on the second
listbox?

The .Column() syntax in Access HELP reminds that this is zero-based ...
start counting columns "0", "1", ...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
W

Wendy

Hi Jeff,
Yup, sure I've got correct column. When trying to use the .column() option,
I get a "Undefined function in expression" error.

I've got around the problem by writing the current ListItem.column() value
into a text box and picking that up in the query. Messy, but gets round the
problem.

Wendy

Jeff Boyce said:
Wendy

Is there a chance that what you have in the second column of the first
listbox is NOT what you want to use for the criteria/filter on the second
listbox?

The .Column() syntax in Access HELP reminds that this is zero-based ...
start counting columns "0", "1", ...

Regards

Jeff Boyce
Microsoft Office/Access MVP


Wendy said:
I have two list boxes (unbound), based on the item selected in one list box
I
would like to display content in another.
I am unable to use something like this in the underlying query/filter of
the
2nd list box Forms![FrmAssignChoices]![lstActivity].column(1).

I know this is simple for you folk out there.

Many thanks

Wendy
 
D

Douglas J. Steele

Another option would be to write a public function that returns the value of
the column:

Function GetListboxValue() As ???

GetListboxValue = Forms![FrmAssignChoices]![lstActivity].column(1)

End Function

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Wendy said:
Hi Jeff,
Yup, sure I've got correct column. When trying to use the .column()
option,
I get a "Undefined function in expression" error.

I've got around the problem by writing the current ListItem.column() value
into a text box and picking that up in the query. Messy, but gets round
the
problem.

Wendy

Jeff Boyce said:
Wendy

Is there a chance that what you have in the second column of the first
listbox is NOT what you want to use for the criteria/filter on the second
listbox?

The .Column() syntax in Access HELP reminds that this is zero-based ...
start counting columns "0", "1", ...

Regards

Jeff Boyce
Microsoft Office/Access MVP


Wendy said:
I have two list boxes (unbound), based on the item selected in one list
box
I
would like to display content in another.
I am unable to use something like this in the underlying query/filter
of
the
2nd list box Forms![FrmAssignChoices]![lstActivity].column(1).

I know this is simple for you folk out there.

Many thanks

Wendy
 

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