Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 24th, 2003, 11:08 AM
Axoliien Axoliien is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 Axoliien User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old July 24th, 2003, 09:35 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,719 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 50 m 18 sec
Reputation Power: 688
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Linking data between tables and forms


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway