Full Version: combobox stores invalid data
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
AlipioSequeira
Hello UA users.

Here is a proble i tried to fix, but...

I have this table for students data and a field ID document type( ID card, etç)
to make easy things and faster I created a table, image "document table" that already contais the document types.

Then i made a combo that searches the doc type from the second table and stores it in the proper field.
Oly this is not hapenning.
First i selected in the wizard two fieldsfrom the doc table, the ID field, and document name.
Access stored in the students table the ID number field data.
Then i tryed to select only the document name in the wizard(...) now access says the data is not valid.

What may be wrong here... anyone????

Thanks for helping.
Greatings from PORTUGAL.
Alipio Sequeira

Edited by: AlipioSequeira on Tue Mar 15 6:23:11 EST 2005.
hazpak
okies the reason the data is not valid is that possibly [field ID] is a numeric data type and [document name] is a text data type. They are incompatible.

What you did first was right you need (in your case) the two field [field ID] (which is PK) and [document name]. Storing the [field ID] in the students table is the correct way of storing this data.

So go back to the first method used for the combo box.

But from what i gather form your statement you want the [document name] stored not the reference. But i can tell you from a design point of view you dont. If you need to see the document name later on reference the document table to find out the corresponding document name for the ID being stored.

Haz.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.