|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Linking data between tables and forms
Access database:
I need to find out how to do the following. Let's say I have a table of states and a table of customers. I want to make a drop down menu of the states for customers to choose, however I want the data stored as integer values. [tblCustomers] Name City State Andy NY 2 Bob Austin 1 [tblStates] StateID StateAbbr StateName 1 TX Texas 2 NY New York This would allow customers to choose Texas yet the program is referencing an integer value. If I filled out mailing labels, it would know to use the abbreviation from the integer value in the customer table. I need the values to appear in forms and if possible when entering data directly. Another good example is if I wanted to classify people like child, parent, brother, sister, etc and wanted to store the classification in a separate table and reference by integer value between the tables. |
|
#2
|
|||
|
|||
|
This doesn't really have anything to do with the database you use.
In Access if you create an Access form just add a combo box and bind it to a column from the form's datasource. Then add a rowsource from a query, view, or table for the dropdown and define the columns. Choose which column is the bound column between the two data sources (the ID column in your case). Then set the width of the 1st (bound) column to 0 and to hide the ID value from the user. If you are using a browser-based front end you'll have more work since there isn't a multi-column select box. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Linking data between tables and forms |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|