Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box not displaying correctly

Status
Not open for further replies.

kimsMTC

Programmer
May 30, 2007
50
US
I changed the SELECT statement on a combo box on my window, added a sort order by LastName and reversed the columns to be LastName, FirstName.

Here's the problem. The combo box displays correctly in my mdb file. I send it to my client, they see it correctly in the mdb file as well. However, when they create a mde file, it is back to the original SELECT statement. I have verified they used the correct file because all other changes I made are displaying on the form.

Please help!
 
It is based on a typed SELECT statement, not a saved query. That may have fixed my problem. However, I did get it fixed, I'm just really uncomfortable with HOW I fixed it...I had to open the mdb file at my client's location on one of their desktops, pull up that form, look at the code, save it, then it worked! Why would that happen? I made zero changes. All I did was look at it and save it.
 
In my very limited experience and from what I have read, the combobox is quicker and easier to manage when it is a query..

For what it is worth.




If I did not say it before, I really appreciate the time and expertise of the users on this forum.
 
DajTwo - I agree

I have also had oddities happen when typed SQL is used instead of saved queries (specifically when used as a data source for forms). Everything I've read has said that saved queries are simply quicker because of their compiled state. Have you ever noticed that after saving a query with various criteria and then you re-open the query and the query has rewritten your criteria? It is Access's way of creating the most efficient query possible for the situation. The only down side I can see is that they clutter the database window and could possibly be deleted by the end user. Which could be addressed in an MDE...
 
I never use queries for comboboxes, always SQL, firstly, because I may wish to change the combobox programmatically according to the needs of the situation, and secondly, because I do not like leaving queries necessary to the application lying around. I have not experienced any problems in doing this in a number of years.

 
Thank you all for your comments. I will use queries from now on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top