A little trouble with a lookup display

Pitabread

Registered User.
Local time
Yesterday, 19:21
Joined
Jun 25, 2009
Messages
13
I'm making a database for a non-profit and I have a volunteer table attached to an volunteer input form. In the volunteer form there's a drop down box that pulls from a "contributors extended" query. "Contributors extended" has a column that takes the last name and first name columns from the contributors table and combines them into a full name for use in other parts of the database.

My problem is that the lookup box in the volunteer form shows all of the names, but when it stores the data in the table it uses the ID number from the contributor table. While these numbers are correct and I'm fine with the data being stored this way, I'm trying to use a volunteer subform in the events form to display who volunteered at what event, and I can't get the box that refers to the volunteer name to display the name instead of the number. The box shows the number but when I click the drop down arrow it still shows all of the names in alphabetical order, so it knows what data these numbers are attached to. I just simply want the names to show instead of the numbers.

Is there anything in the properties that I could change or could I alter the query sql to display the name instead of the number?

Any suggestions?... thanks in advance
 
You probably want to change the column widths propery of the combo. A width of 0 hides a column.
 
You probably want to change the column widths propery of the combo. A width of 0 hides a column.

Thanks for the quick response...
They're all already formatted as 1", but I experimented with changing them anyway and it didn't work.

Is there anything I could code in sql and stick in the query that would display the [Contributors Extended].[Contributor Name] that pertains to the Volunteer_ID number?
 
I noticed that in the combo box in the volunteer form that pulls from the contributor names has a column width of "0";1"". When I changed this to just "1"" the number displayed in the form instead of the name. Now when I go into the table design view and change the column width of the source field to "0";1"" (hoping it would have the same effect) it instead got rid of the names that displayed when I clicked the drop down in the table. Now it's just the Volunteer_ID number with a blank drop down instead of the populated drop down that it was showing before.
 
What is the rowsource of the combo?
 
SELECT [Contributors Extended].ID, IIf(Len([File As] & "")=0,[Company],[File As]) AS [Volunteer ID] FROM [Contributors Extended] ORDER BY [Contributors Extended].[File As];

[File As] is used to format [Last Name] & ", " & [First Name] from the contributors table. I use this so the combo in the volunteer form will auto-complete when they start typing the volunteer's last name.
 
More briefly the row source is [Contributors Extended].[File As], the code I sent before merely displays the company name if the contributor name is blank, which you helped me with a couple of weeks ago if you remember...
 
I guess I'm confused, because with column widths of 0";1" you should see the names (company or file as). Can you post the db?
 
I have to go home now, but I'll post it tomorrow morning. Thanks a lot for the help
 

Users who are viewing this thread

Back
Top Bottom