473,657 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo Box Row Source Ordering

I am adding a drop down comb box to an existing database I wrote about a year
ago. This combo box list names where the user can select which record to go to.

Sigh.

Last, First Name and a hidden key field. I've got everything working, and have
it on different forms. Created a routine to set it to SELECT the right fields
for the right table for the right forms. I also have it successfully ordering
by.

I mean the user can sort the last name field, descending. So I want the drop
down list to be descending too, when they use it. Works fine WHEN THE FORM IS
OPENED. I can trim the form's order by and add on "ORDER BY " to the SELECT
statement to for the combo box's row source.

But, big but, it only works when the form opens, because they can resort the
last (or first name field) after opening. Which means the drop down combo box
will then be out of order. Not a big problem, but I would like it to match.

Is there any way to detect when someone sorts? I haven't found any such event.

Also, when the form opens, the box is blank. It only picks up a default name
after one drop down and selection. I'd like it to fill in with the first record
that comes up.

HELP!!!

Any help appreciated, this is driving me nuts.

Doe :-)
do*******@aol.c om
IF http://members.aol.com/doepage/intfict.htm
(An Iffy Theory | Glulx/Glk for Duncies | unglklib | Inform Primer)
IF Art Gallery http://members.aol.com/iffyart/
IF Review Conspiracy http://zork.plover.net/~textfire/conspiracy/
Nov 12 '05 #1
5 8885
do*******@aol.c om (Marnie Parker) wrote in
news:20******** *************** ****@mb-m13.aol.com:
I am adding a drop down comb box to an existing database I
wrote about a year ago. This combo box list names where the
user can select which record to go to.

Sigh.

Last, First Name and a hidden key field. I've got everything
working, and have it on different forms. Created a routine to
set it to SELECT the right fields for the right table for the
right forms. I also have it successfully ordering by.

I mean the user can sort the last name field, descending. So I
want the drop down list to be descending too, when they use
it. Works fine WHEN THE FORM IS OPENED. I can trim the form's
order by and add on "ORDER BY " to the SELECT statement to for
the combo box's row source.

But, big but, it only works when the form opens, because they
can resort the last (or first name field) after opening. Which
means the drop down combo box will then be out of order. Not a
big problem, but I would like it to match.

Is there any way to detect when someone sorts? I haven't found
any such event.

Also, when the form opens, the box is blank. It only picks up
a default name after one drop down and selection. I'd like it
to fill in with the first record that comes up.

HELP!!!
The sort issue can be resolved if you use a sort button on the
form, but not the sort buttons on the toolbar. All you need to do
is send the new sort order in the same way you do at form opening
and then mycomboboxname. requery.

for your second issue, you can preset the combobox from the
form_current event by setting its value to the key value of the
current record in the form

Bob Q.


Any help appreciated, this is driving me nuts.

Doe :-)
do*******@aol.c om
IF http://members.aol.com/doepage/intfict.htm
(An Iffy Theory | Glulx/Glk for Duncies | unglklib | Inform
Primer) IF Art Gallery http://members.aol.com/iffyart/
IF Review Conspiracy
http://zork.plover.net/~textfire/conspiracy/


Nov 12 '05 #2
rkc

"Marnie Parker" <do*******@aol. com> wrote in message
news:20******** *************** ****@mb-m13.aol.com...
Is there any way to detect when someone sorts? I haven't found any such

event.

Use the Form's On Current event to check the Form's OrderBy property.
Nov 12 '05 #3
>Subject: Re: Combo Box Row Source Ordering
From: Bob Quintal bq******@genera tion.net
Date: 11/7/2003 6:52 PM Pacific Standard Time
Message-id: for your second issue, you can preset the combobox from the
form_current event by setting its value to the key value of the
current record in the form

Bob Q.


Thanks! I'll try that.

Doe :-)
do*******@aol.c om
IF http://members.aol.com/doepage/intfict.htm
(An Iffy Theory | Glulx/Glk for Duncies | unglklib | Inform Primer)
IF Art Gallery http://members.aol.com/iffyart/
IF Review Conspiracy http://zork.plover.net/~textfire/conspiracy/
Nov 12 '05 #4
>Subject: Re: Combo Box Row Source Ordering
From: "rkc" rk*@yabba.dabba .do.rochester.r r.bomb
Date: 11/7/2003 9:24 PM Pacific Use the Form's On Current event to check the Form's OrderBy property.


Already do that. Only good for when form is opened. I can set the row source
sort then based on the orderby. Not good for when they sort after opening.

I used Access to write this database (been programmer in other "languages" ),
but it is just this sort of thing -- not having true event tracking -- can't
tell *when* a user sorts or resorts -- that has seriously turned me off it.

Not that there is a lot better out there for small business database
development.

I've decided to live with it the way it is, the sort in the combo box won't
match the record sort, if the user resorts after opening the form. Not a
biggie, just annoying.

Thx anyway.

Doe
do*******@aol.c om
IF http://members.aol.com/doepage/intfict.htm
(An Iffy Theory | Glulx/Glk for Duncies | unglklib | Inform Primer)
IF Art Gallery http://members.aol.com/iffyart/
IF Review Conspiracy http://zork.plover.net/~textfire/conspiracy/
Nov 12 '05 #5
rkc

"Marnie Parker" <do*******@aol. com> wrote in message
news:20******** *************** ****@mb-m23.aol.com...
Subject: Re: Combo Box Row Source Ordering
From: "rkc" rk*@yabba.dabba .do.rochester.r r.bomb
Date: 11/7/2003 9:24 PM Pacific
Use the Form's On Current event to check the Form's OrderBy property.


Already do that. Only good for when form is opened. I can set the row

source sort then based on the orderby. Not good for when they sort after opening.


All you have to do is extend what you are already doing a tiny bit.

The current event is fired each time the form is sorted.

The OrderBy property is changed each time the form is sorted.

If you store the current OrderBy property in a form level variable when
the form opens you can then use the On Current event to compare the
stored value to the current OrderBy property. If they are not the same
then you know the form has been sorted and can determine how it
has been sorted.

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2380
by: Dalan | last post by:
I have been searching the archives in an effort to discover how to derive a dual use of a single combo box - so far no go. I found the piece below which pretty much represents the usage. To summarize: The cboKeyword box on the frmCustomer looks up Keywords from a separate table that have just a list of keywords and a KeyID number. The bound column is tied to the autonumber and is saved in the frmCustomer table. The keywords appear in the...
2
1570
by: highway of diamonds | last post by:
I have a form which uses new information and information from two tables to create a record. This information is chosen by the user uing a combo box. What's happening is the list shown by the combo box is not sorted AtoZ. As the list has grown this is confusing the user. Form is 'add new property' which creates a new property in a table, each property has a landlord and it is this information, taken from the 'landlord' table that is...
3
3649
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1" through "Phase 10" (there are 10 Phases I want to sort from) Once the phase has been selected a second combo box would populate.
2
1870
by: MLH | last post by:
I invoked the combo-box wizard today, telling it to use a 4-table union query as a row-source for the combo-box it was assisting me in building. The error I got was without number and stated, "Data cannot be retrieved from the source you have selected. You must select a different table or query to continue in the wizard." just after I chose the query named qryAuthsOwnersAddnlOwnersLienholders4OneCar. Have any of you ever seen that error...
1
3870
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the rowsource of the second combo. The second combo's control source is the Product ID field (foriegn key) on the Orders table. Everything worked well until I decided to enhance the form by changing the second combo to an option group. Now I don't know...
4
64588
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one determines the available options in the other. TERMINOLOGY Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
1
3094
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form Main form: no record source. Has an unbound combo box. name: frminput combo name: cboAccounts The row...
2
3140
by: Sid | last post by:
I need some help in setting up Access combo box. I am using three comboboxes in my form. Comb Box 1, Combo Box 2, Combo Box 3. The row source for each of the combo box is a seperate table. Table 1 acts as row source for Combo Box 1 Table 2 acts as row source for Combo Box 2 However for combobox 3, I was trying to use 4 different tables as row source. I am trying to set up a criteria such that row source for comb
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.