Combobox shows AutoNumber instead of selected field (1 Viewer)

ericryd

Registered User.
Local time
Today, 09:25
Joined
Jun 24, 2008
Messages
36
Hello, I built a database for tracking absences and tardies that multiple depts use in our company.

The request was made to add a department filter, which I am doing and almost done, but i'm running in to a problem. On the opening page, there is a report section that originally had 2 drop downs (Select Coworker, Select Report). Then a button that runs the selected report with the Coworker as the criteria. This worked great.

Now I am adding the department level, so you would first select department name, and it would limit the results of the Coworker drop down to those only belonging in the department. I did this on another form (absence entry form) and it works great....but not here. When I select the drop down for the Department, it lists the Auto-Number and not the Department name like it should.

SQL query:
SELECT Departments.[ID2], [Departments].[DepartmentName] FROM Departments ORDER BY [DepartmentName];
Even if I take out the ID2 from the select, it still shows the numbers and not the names. Any thoughts??

Attached its the DB
 

Attachments

  • Copy of occurrencesdb.zip
    80.2 KB · Views: 117

Magster

Registered User.
Local time
Today, 07:25
Joined
Jul 30, 2008
Messages
115
If you're using a combo box, make sure that you have the first column width set to zero, then the second column set to 2" or 3" or whatever you need to display your department name. In the Combo box column width, it would be for example, 0";3"

On the data tab of the combo box, make sure that the bound column is 1 because that is the primary key of your lookup table query.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 00:25
Joined
Aug 29, 2005
Messages
8,263
Firstly, you'll get a better Response if you save your DB back to an earlier version of Access as not everyone has 2007.

I suspect that the problem is due to the column set up in your Combo. (I don't have 2007 on this computer, so can only guess)

Either rearrange your column order or set the columns you don't wish to see to zero width.
 

ericryd

Registered User.
Local time
Today, 09:25
Joined
Jun 24, 2008
Messages
36
Thanks for the tip about saving as an 03 database, i'll do that in the future.

I was able to fix this issue with the column settings, thanks for your input (both of you)!
 

Users who are viewing this thread

Top Bottom