Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Combo-Box list unsorting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wissam - 28 Dec 2007 17:24 GMT
Hi, I have a combo box on a form with the list rowsrource type from a table
that contains names of medications. The list on the combo box gets
automatically sorted alphabatically. Is there a way for me to have the list
in the combobox show the data as I want (based on the medication that will be
chosen the most on top of the list of the combobox), rather than
alphabatically?

Another question: On that same form, I added a textbox that had a control
Source a field I (called visitType) in a table called visits. I do not want
this field in the database any more. On the form design view, I deleted the
text box and then  deleted the control source field (visitType) from the
table. However,after I did that, whenever I try to open the form again, a
prompt box pups up asking me for the parameter visit.visitType value.  On the
field list for the form, I still see the visitType as an option (though it is
not on the form). Is there a way to fix this?

Thanks a lot.
Douglas J. Steele - 28 Dec 2007 18:09 GMT
Create a query that returns the data in the desired order, and use that
query as the RowSource for the combo box rather than just the table.

For the second problem, take a look at the form's RecordSource. If it's a
query, make sure that the query doesn't include the deleted field.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hi, I have a combo box on a form with the list rowsrource type from a
> table
[quoted text clipped - 20 lines]
>
> Thanks a lot.
Wissam - 28 Dec 2007 19:18 GMT
Thanks a lot for your help.
Your precious suggestion fixed problem 1.
However, I still have problem 2.
I am still in the process of creating my database. I created a Form and I
added  text boxes to the form by selecting a table (say Table1), then
drag-dropping fields from Table1 to the Form. I later decided that I do not
want one of the fields (say Field2) in Table1 and the Form. I deleted the
text box for Field2 from the form and then deleted the text box from Table1.
However, in the form Field option, I still see Field2 (ex. the code on the
title of the Field list box for the Form still says something like : SELECT
Table1.Field1,Table1.Field2,..; despite the fact that Field2 should have been
deleted from both the form and Table2. With this, whenever I try to open the
form again, I get a prompt box asking me to "enter parameter value for the
Table1.Field2" . Is there a way for me to fix this. Alternatively, is there a
way for me to open the form and delete Field2 from the SELECT... code
sentence?
Thanks a lot for your help.

> Create a query that returns the data in the desired order, and use that
> query as the RowSource for the combo box rather than just the table.
[quoted text clipped - 26 lines]
> >
> > Thanks a lot.
Douglas J. Steele - 28 Dec 2007 19:36 GMT
With the form open in Design view, look at the Properties window. Find the
RecordSource property and select it. That should activate an ellipsis (...)
to the right of the text describing the recordsource. Click on that, and
it'll take you to the query. Change the query, and say Yes when it asks if
you want to save the changes.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Thanks a lot for your help.
> Your precious suggestion fixed problem 1.
[quoted text clipped - 56 lines]
>> >
>> > Thanks a lot.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.