PDA

View Full Version : Solved: Data Type Question



JustJerry
09-28-2005, 09:11 PM
Ok, so I'm looking in the Northwind database at the "Order Details Table", and I have a question regarding one of the 'fields' in that table.

The Field 'Product ID' is listed as being a 'number' data type. Yet, when you open the table to look at the values, there is a text entry in the Product field.

The Product ID is the same as the field Product ID in the Products table, which is the Primary Key set to autonumber. I have some similar tables, and when I store values in other tables, I get the value of the autonumber stored, NOT the text version as in the Order Details Table.

So, I am just wondering how they get a Text value stored in a field set as a Number type.

Thanks again,

Jerry

xCav8r
09-28-2005, 09:38 PM
It's a combobox that displays the text your talking about. Take a closer look at the design of the field. You'll see a tab for lookup, and you can see how the combobox was set up. It's displaying product names, but it's storing product IDs.

JustJerry
09-29-2005, 08:02 PM
It's a combobox that displays the text your talking about. Take a closer look at the design of the field. You'll see a tab for lookup, and you can see how the combobox was set up. It's displaying product names, but it's storing product IDs.

Yeah, I saw the coding in the source of the combobox, but was confused just because of the data source. After reading your post, I tried one for myself, and imagine, it even worked! :clap:

Thanks for the reply, as I thought there was some voodoo magic involved :eek:

geekgirlau
09-30-2005, 02:49 AM
Hi Jerry,

Don't forget to mark this thread as "Solved"

JustJerry
10-02-2005, 07:54 PM
Oooops, My Bad~:doh: