473,786 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking Fields together in Access

I am creating a form that needs to read information from another table.
The user selects a single value from a drop-down box that is linked to
the first column of data in the table I want to read from. I then have
two other objects that need to take the data from the corresponding
fields of that record.

For example.

If the table looks like this

Column A Column B Column C
2047 4 mlb5000
9999 50 lporter
If a user selects 2047 from the drop down box, the Text boxes following
it will be filled in with 4 and mlb5000. If they select 9999 it will
be filled with 50 and lporter, and so on and so forth. How do I go
about doing this?

Matt

Jul 25 '06 #1
2 4206
Matt -
This was answered about a half hour before you made your post.
Learning how to search effectively could save you time.

To answer the question, assuming your combo box is named Combo1 and
the text fields are named Text1 and Text2, they would be filled as
such:

Text1.text = Combo1(1)
Text2.text = Combo1(2)

Combo1(0) is the first field (Column A in your example)

ml*****@psu.edu wrote:
I am creating a form that needs to read information from another table.
The user selects a single value from a drop-down box that is linked to
the first column of data in the table I want to read from. I then have
two other objects that need to take the data from the corresponding
fields of that record.

For example.

If the table looks like this

Column A Column B Column C
2047 4 mlb5000
9999 50 lporter
If a user selects 2047 from the drop down box, the Text boxes following
it will be filled in with 4 and mlb5000. If they select 9999 it will
be filled with 50 and lporter, and so on and so forth. How do I go
about doing this?

Matt
Jul 25 '06 #2
Actually, see the following:

In the AfterUpdate event of the combo enter something like
Me.Text1 = Me.Combo1.Colum n(1)
Me.Text2 = Me.Combo1.Colum n(2)

Jul 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4756
by: Phil S | last post by:
I used the Migration Workbench for Oracle 9.2 Client to migrate the tables in an Access 2K back-end database to Oracle. (The Migration Workbench is intended to automate the process of migrating tables from Access to Oracle.) Following the migration, when I try to link the Oracle table to the Access front-end using Oracle ODBC Driver, I have to either select one or more fields in the Oracle table as key fields or not have any key fields. ...
1
1845
by: donhyams | last post by:
It seems like at one time I knew how to do this, but right now I'm drawing a blank. I know there has to be an easier way to link tables using more than one field. Heres a simplfication of the problem: I have two tables that are not normally linked to each other: ------------ tblClientStatusDetails with these fields: ...ClientStatusID = Autonumber (Primary Key)
1
1564
by: \Pharah | last post by:
Hi. It's me again. Just wanted to know: How do you join two fields together? I mean if you enter Field 1 (i.e. Sales Executive) Field 2 (i.e His/Her Manager) automatically populates? Can you tell me how that's done (step-by- step, since I am new to this)? Thanks in advance. Pharah
1
2017
by: hmiller | last post by:
I'm sorry to populate the server with yet another question about linking multiple tables and queries, howerver I have not been able to find the right criteria. My problem. I am trying to either link 3 tables together in a select query, and maintain the editablity that I get when linking two tables and creating a form. I know there is a way to link 3 tables through multiple queries however I have yet to be able to get it to work.
2
8390
by: darnel | last post by:
I have 4 hierarchical tables and want to display it all together as a form and 3 subforms, when subform displays (and allow to add/edit) only relevant items from each superior subform. Tables are: Clients --> linked thru id_client --> Orders --> linked thru id_order --> Licences --> linked thru id_licence --> Regkeys Access' Form Wizard allows only form + 2 subforms. I tried to create last subform and its link manually, but I'm not...
3
3164
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to connect to a new location (ie: datapath variable below). However, if you remove or even rename the old database, then launch your program, the code fails on the mytable.refreshlink line with an error 3044. (Description of that error is: 'C:\pc
7
3061
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro 2.0;HDR=NO;IMEX=2;DATABASE=C:\Test It's really easy to connect to those tables in A97. I'm having difficulties in A2003. I'm trying to follow the instructions in http://support.microsoft.com/kb/824264/.
38
2667
by: abasili | last post by:
Hi everyone, I'm trying to compile a C++ function and then call it from a C program. Since Google is my friend I've ended up to this link which seems very clear: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html Unfortunately it does not work. Here is what I'm doing: -----------------------------------------
8
2291
tharden3
by: tharden3 | last post by:
Hey Bytes, The website I'm working on is coming along just fine, and I'd like to thank all of you PHP folks who have been helping me out. I'm almost done with the coding! I'm trying to get the data-basing code finished with. I've got my products, with lines of text next to it that serve as descriptions. With each of those entries, I have images. I've implemented the code for displaying the text, and I've also implemented the code for the...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.