G
Guest
Hi, I have Access 2003. I created a combo box using the wizard. I have
compared my combo box properties to the Northwind database combo boxes on the
products form. I do not see any differences between the my combo boxes and
those in Northwind. However, in Northwind I can select a product from the
drop-down list of the combo box and the product name is stored in the product
table. On my form (I am selecting a site) when I select the site name the
site ID is stored in the site name field of my table. Here is what I have:
Name: SiteID
Control Source: SITE_ID
Row Source Type: Table/Query
Row Source: SELECT DISTINCT SITE.SITE_ID, SITE.SITE_NAME, SITE.SITE_ACRONYM
FROM SITE ORDER BY SITE_NAME;
Column Count: 3
Column Heads: No
Column Widths: 0";0";1"
Bound Column: 1
When I change the bound column to 2, I get a error box popping up: The value
you entered isn't valid for this field. For example, you may have entered
text in a numeric field or a number that is larger than the FieldSize
setting permits.
The datatype for SiteID is numeric and the datatype for SiteName is text.
When I used the wizard, I selected:
I want the combo box to look up the values in a table or query.
I selected the Table: SITE
I selected all 3 columns in the SITE TABLE: SITE_ID, SITE_NAME, and
SITE_ACRONYM
I selected SITE_NAME to sort in ascending order.
I chose my column widths and checked the box to hide the key column
(SITE_ID) as the wizard recommended doing this.
I selected to "Store that value in this field" and chose "SITE_NAME"
I gave the combo box the name shown above.
Any clue as to why when I select a site name from my list, close the form,
open the table, and I see the site_id value inthe site_name field but not the
actual name?
Thanks for the help.
compared my combo box properties to the Northwind database combo boxes on the
products form. I do not see any differences between the my combo boxes and
those in Northwind. However, in Northwind I can select a product from the
drop-down list of the combo box and the product name is stored in the product
table. On my form (I am selecting a site) when I select the site name the
site ID is stored in the site name field of my table. Here is what I have:
Name: SiteID
Control Source: SITE_ID
Row Source Type: Table/Query
Row Source: SELECT DISTINCT SITE.SITE_ID, SITE.SITE_NAME, SITE.SITE_ACRONYM
FROM SITE ORDER BY SITE_NAME;
Column Count: 3
Column Heads: No
Column Widths: 0";0";1"
Bound Column: 1
When I change the bound column to 2, I get a error box popping up: The value
you entered isn't valid for this field. For example, you may have entered
text in a numeric field or a number that is larger than the FieldSize
setting permits.
The datatype for SiteID is numeric and the datatype for SiteName is text.
When I used the wizard, I selected:
I want the combo box to look up the values in a table or query.
I selected the Table: SITE
I selected all 3 columns in the SITE TABLE: SITE_ID, SITE_NAME, and
SITE_ACRONYM
I selected SITE_NAME to sort in ascending order.
I chose my column widths and checked the box to hide the key column
(SITE_ID) as the wizard recommended doing this.
I selected to "Store that value in this field" and chose "SITE_NAME"
I gave the combo box the name shown above.
Any clue as to why when I select a site name from my list, close the form,
open the table, and I see the site_id value inthe site_name field but not the
actual name?
Thanks for the help.