Go Back   PCMech Forums > Help & Discussion > Software Discussion & Support

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-15-2005, 02:09 PM   #1
Member (10 bit)
 
Join Date: Jul 1999
Location: Pickerington, OH-IO
Posts: 875
Question MS Access and drop down list boxes

I've put together an Access database of clients at a clinic but am having this problem- I put in a combo box that is linked to the student's names. I can click on the box, a list opens and then when I click on a name- then that student's file opens- so far so good. Question: How do I set the box so that the student names automatically appear in alphabetical order? That is, when I add new students, the new ones just appear at the bottom and are not automatically put in alphatbetic position. I can't set the names as the primary key because some students have the same last names.
Prew is offline   Reply With Quote
Old 02-16-2005, 12:40 AM   #2
Member (5 bit)
 
velkropie's Avatar
 
Join Date: Jan 2005
Posts: 24
Quote:
Originally Posted by Prew
I've put together an Access database of clients at a clinic but am having this problem- I put in a combo box that is linked to the student's names. I can click on the box, a list opens and then when I click on a name- then that student's file opens- so far so good. Question: How do I set the box so that the student names automatically appear in alphabetical order? That is, when I add new students, the new ones just appear at the bottom and are not automatically put in alphatbetic position. I can't set the names as the primary key because some students have the same last names.
what program are you using to create the combo box and bind to the access "database"? you should have the option to set your combo box items either ascending or decending on that program...
velkropie is offline   Reply With Quote
Old 02-16-2005, 05:50 AM   #3
Member (10 bit)
 
Join Date: Jul 1999
Location: Pickerington, OH-IO
Posts: 875
I just using the combo box from the tool box in Access- I don't seem to have the option of ascending or descending when I set the combo box so that when I on a name and then that name opens the student's file- however, if I set the combo box as a list box I can set it as ascending- but then I can't open the file by clicking on the student's name- there must be an option that I am missing- I just can't seem to find it- or do I need to write an 'event' procedure?
Prew is offline   Reply With Quote
Old 02-16-2005, 09:51 AM   #4
Member (11 bit)
 
sdkfz's Avatar
 
Join Date: Dec 2001
Location: Shakopee MN
Posts: 1,293
Are you using a table as the source for the drop down - ie TblStudent_Name or some such? If so then all you need to do is have the source table sorted in its properties, then when you add a name it appears at the bottom but when you close and reopen the table the names are sorted.

In a table I have that is used just the same the names are in a single field enterd: "Last Name, First Name", the field is indexed - "Yes- No Duplicates" and there is a A to Z sort saved on the table. Give it a try, after you do the sort and try to close Access will ask if you want to save the changes, say yes.

If on the other hand you ever want to remove a sort, open the table - ie not design view and in the menu bar you should now have a new item "Records" between 'Format' and 'Tools'. Here there is an option to remove the filter and sort.
__________________
Never Argue With An Idiot. They'll Drag You Down To Their Level And Then Beat You With Experience.
sdkfz is offline   Reply With Quote
Old 02-17-2005, 01:24 PM   #5
Member (10 bit)
 
Join Date: Jul 1999
Location: Pickerington, OH-IO
Posts: 875
Great, thanks- that's helpful- I also realized I didn't have the row source correctly identified- everything works fine now
Prew is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:42 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2