ID showing on form, NOT number

fraser_lindsay

Access wannabe
Local time
Today, 23:00
Joined
Sep 7, 2005
Messages
218
ID showing on form, NOT text value

Hello,

I am building a relatively small database, but it is made up of a number of different tables which are fed by other tables.

My three main tables are:

EmployeeDetails
Occupational Risk Profile
Health Surveillance Requirements

The employee details table has fields fed by small tables such as Department, Location, Business Unit, Occupational Group etc. These are all made up of an autonumber primary key column and a variable column as described above.

I have been going round in circles with a lot of this as I am still learning.


My problem is that on my forms these fields are showing as numbers and not the text values. For example, I have one form made up for each of the main tables above but I can't get them to display the relevant text.

I did a search on here and somebody said to create query to link the tables and bind this query to a form.

How do I set up the query just to return the text part and not the number?
How do I bind this query to the form if I already have the record source on a my form as a table? (can you have more than one source in the record source?)
Do I create one large query with all of these fields and use this as the basis for the form?

Thanks
 
Last edited:
Do I create one large query with all of these fields and use this as the basis for the form?

Yes :)

Then you can just pick out the fields you want to show

Peter
 
Ok, I managed to answer my own question. That was good.

However, I'm still doing something wrong, I have changed the record source to my new ubder query and experimented with a couple of fields but I'm still getting the ID number number showing and not the text.

I know it must be the way I've set up my query but i don't know what I'm doing wrong.

I have only added the tables "Business Unit", "Geographical Location" and "Employee Details" so far.

When I add a new combo box and set it to show business unit it still only shows "2".

How should this be set up in the query grid to ensure that the text displays and not the 2. I have selected "business unit" in the grid and not ID, yet ID shows in the form, whereas the text shows in the query.
 
generaly if you let the wizard set up comboboxes it will hide the ID for you.
The Control source should be the ID number
The Row source for the Combobox should be the lookup table for the "Business unit"
Normaly you then have the ID, then the Text Version
in the property sheet you have
Column Count = 2
Column widths 0cm;2.54cm
Bound Column = 1

Adjust widths to suit :) the important bit though is that the ID column is '0' that way it is hidden in the box but is used to store the ID in your main table.
You may also want to base the Row source on a query rather than the table directly so that you can sort the order.

Peter
 

Users who are viewing this thread

Back
Top Bottom