Sort in VB using a ComboBox Column Other than the Bound Column

M

magmike

I have a code in VB on the field labels in a continuous form that sorts based on that field when clicked,

OrderBy = "form.field"

However, with one field, Status, I would like to sort based on the second column (Column(1), correct?), since right now, it is sorting on the bound column, a hidden column and id number, so the user does not see alphebetical sorting.

Is there a way to accomplish, this as the following is not working,

OrderBy - "me.form.field.column(1)"

Thanks in advance,

magmike
 
R

Ron Weiner

magmike expressed precisely :
I have a code in VB on the field labels in a continuous form that sorts based
on that field when clicked,

OrderBy = "form.field"

However, with one field, Status, I would like to sort based on the second
column (Column(1), correct?), since right now, it is sorting on the bound
column, a hidden column and id number, so the user does not see alphebetical
sorting.

Is there a way to accomplish, this as the following is not working,

OrderBy - "me.form.field.column(1)"

Thanks in advance,

magmike

http://www.lmgtfy.com/?q=sorting+access+combo+box
 
M

magmike

I have a code in VB on the field labels in a continuous form that sorts based on that field when clicked,

OrderBy = "form.field"

However, with one field, Status, I would like to sort based on the second column (Column(1), correct?), since right now, it is sorting on the bound column, a hidden column and id number, so the user does not see alphebetical sorting.

Is there a way to accomplish, this as the following is not working,

OrderBy - "me.form.field.column(1)"

Thanks in advance,

magmike

The first time was funny. Now I am starting to think that you don't think this newsgroup is supposed to be used at all. And in fact, I did not find my answer in your search. I know how to sort a combo box. Please re-read my post or ignore it and move on.

Can anyone else help?
 
R

Ron Weiner

magmike has brought this to us :
The first time was funny. Now I am starting to think that you don't think
this newsgroup is supposed to be used at all. And in fact, I did not find my
answer in your search. I know how to sort a combo box. Please re-read my post
or ignore it and move on.

Can anyone else help?

OK you obviously do not posess the ability to do any research. So here
is what you need to know:

1) Neither Combo boxes, nor List boxes have a Sort method.
2) The order of items in Combo and List boxes is controled by its Row
Source property.

Sooo....

Apply whatever sort you require to the query that is the combos Row
Source property.

Rdub
 
A

Access Developer

magmike said:
The first time was funny. Now I am starting to think
that you don't think this newsgroup is supposed to
be used at all.

The Microsoft-sponsored newsgroups (including this one) used to be based at
news.microsoft.com, but over a year ago, Microsoft took down that news
server and replaced the sponsored newsgroups with "forums". However,
because of the way USENET newsgroups work, they remain as "zombies" (no less
useful than when hosted at Microsoft). But, it *is* funny that you say what
you did because, in fact, in Microsoft's view, it isn't "supposed to be used
at all". Those of us who do are just taking advantage of the way USENET
works.
 

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