Referring to Column(1)

T

Tony Cannizzo

I have a query that is displayed in a multi-column list box on a form.
AccountID, IndividualID, Account Name, Individual Name, Phone Number
AccountID and IndividualID are suppresed with a 0";0" column width

A macro is initiated that opens two forms via DblClick on a particular row
The two forms are Account Profile and Individual Profile

The filter on the Account Profile is fine -
[accounts]![AccountID]=[Forms]![_Dashboard]![today on main]

But the filter used to open the Individual Profile is misbehaving"
With the expression builder, I enter
[individuals]![IndividualID]=[Forms]![_Dashboard]![today on main].Column(1)
but it converts it to
[individuals]![IndividualID]=[Forms]![_Dashboard]![today on
main].[Column](1)
which doesn't work.

Any help would be appreciated.

Thanks.
Tony C
 
J

John Vinson

I have a query that is displayed in a multi-column list box on a form.
AccountID, IndividualID, Account Name, Individual Name, Phone Number
AccountID and IndividualID are suppresed with a 0";0" column width

If you want the AccountID to be used, that's column(0), not column(1)
- it's a zero based list.

John W. Vinson[MVP]
 
V

Van T. Dinh

The square brackets around "Column" are fine.

How do you the filter you post?

As a criterion in the RecordSource Query?

In the "WhereCondition" of the OpenForm method?

As the Form's Filter Property?

Some other method?

The qualifier "[individuals]" may be the problem in some uses. Try without
this qualifier. If it doesn't work, please answer the above question(s) and
post the SQL (or SQL of the Query) being used as the RecordSource for the
Form [frmIndividual].
 
R

Ron2006

For the column reference for a listbox you need BOTH an Index and a Row

me.DiscLetterbx.Column (Index,row)

And both of those may be relative to 0

A combobox only requires an index that is relative to 0

Ron
 

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