ID instead of Text

J

John Townsend

Why do I get ID numbers in some queries and not the text that I want, as
well as in my reports?
 
E

Evi

Could you tell us a bit more, please. Do you have a table with ID numbers
that is joined from another table?
List your tables with their field names, telling us which ones are joined to
which.

To give you a simple example to get you started:

You have a database about dogs.
You have a list of DogBreeds in a table called Breeds.

It has an Autonumber field called BreedID and a text field called Breed
which lists all the different dog breeds
The Dogs table has
DogID
DogName
BreedID

You would add all of the Dogs table to your query grid.

Click on the Add Table button and choose your Breeds table.

From the Breeds table you would NOT add BreedID - you have got that from the
Dogs table - you would add Breed.

When you look at your query, you will now see both the BreedID and the
Breed.

To choose the right breed for your dog you would use a combo box in a form.

If you know all this and it still isn't happening (and this happened to me
recently) then you have a corrupted table/database. After trying numerous
things to repair it, I actually had to rebuild my database to make it work.
I used the exact same structure and the thing worked but it did give me a
nasty moment until I realised what it was.



Evi
 
V

Van T. Dinh

My guess is that you used LookUp Fields in your Table and since your Table
Datasheet shows Text, you expect the same in your Reports. Unfortunately,
LookUp Fields generally store ID numbers, NOT the Text you see. Therefore,
we don't recommend using LookUp Fields.

For more info., see:

http://www.mvps.org/access/lookupfields.htm

For the moment, you need to add the "LookUp" Table into the Query (and the
RecordSource for the Report) and use the corresponding Text Field rather
than the LookUp Field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top