473,609 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make 2 fields in one combo box go into 2 fields in a table???

I have three things,
1. a form with a combo box on it.
2. A lookup table with 2 fields, RMName and RMmrm.
3. A table with site information including an RM field and an MRM
field.
The combo box is getting its info from the lookup table but only the
RMName is visible. I have the control source set to MRM so that when
an RM name is selected the RMmrm (RM code) goes into the MRM field in
my site table.
What I need to do is when an RM name is selected in the combo box, the
RMmrm goes into the MRM field in my site table
AND I want the RMName to go into the RM field in my site table.
How do I make 2 fields in one combo box go into 2 fields in a table???

Sep 13 '06 #1
1 1657
andy wrote:
I have three things,
1. a form with a combo box on it.
2. A lookup table with 2 fields, RMName and RMmrm.
3. A table with site information including an RM field and an MRM
field.
The combo box is getting its info from the lookup table but only the
RMName is visible. I have the control source set to MRM so that when
an RM name is selected the RMmrm (RM code) goes into the MRM field in
my site table.
What I need to do is when an RM name is selected in the combo box, the
RMmrm goes into the MRM field in my site table
AND I want the RMName to go into the RM field in my site table.
How do I make 2 fields in one combo box go into 2 fields in a table???
Personally, I'd name the MRM field as MRM in both tables, and RMName in
both. It just makes it easier, as far as I'm concerned, when coding to
know what you are referring to.

I see no reason to store the RMName in the table since you can link the
two tables together...but do what you want...it's your app.

What I would do, if I were in your position, is to write the query with
your site table with the MRM table linked to the lookup table and drag
the RMName field to a column...and display that.

Anyway, since your control source on the combo is set to MRM, that's all
you need to do. As far as the name goes, if you absolutely have to
store the name...use the Column feature. Columns start at 0 to the
number of columns minus 1. So if the first col is RMRNum, the second
RMRName, then something like
Me.RMName = Me.ComboRM.Colu mn(1)

Sep 13 '06 #2

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

Similar topics

3
22246
by: Bobbak | last post by:
Hello All, I was wondering if it is at all possible to have a single combo box update multiple fields in a single record. For example I have created an Employee Info form, and in that form there's a combo box (called "DirectorName") that contains the Directors Info that is connected to a table called "tblDirector" that has the Director's First Name, Last Name, and Director ID. Now all three fields appear in the one combo box (which the...
2
1675
by: Miguelito Bain | last post by:
hi everyone- i inheritrd a database that wasn't designed very well. i'm trying to decide whether or not it is a good idea to add at least 8 more fields to a table that already has existing records in it- about 800. right now, a combo box records the reason why a particular person called. i want to add 3 more combo boxes to record the other reasons why someone called.
1
2031
by: Jason | last post by:
I have a form that is used for entering and editing site address information. The data in the form is from one table, named Total_Site_Address. There are fields in this table (and controls on the form) for entering in a new site address or choosing an existing site address. There are two fields that address the existing site addresses, one named ADDRESS, the other named TAX_NAME (contains municipality info). The ADDRESS field is setup...
0
1481
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with: 1.) I'm trying to create a many to many relationship, and I get the following Error when I try to enforce referential integrity.
9
20295
by: Christopher Koh | last post by:
I will make a form which will search the database (just like google interface) that will look/match for the exact name in the records of a given fieldname. Any suggestions on how to make the code?
2
4010
by: Cro | last post by:
Dear Access Developers, I am developing a form with 'default view' set to "continuous forms". I am suffering with a problem I can't yet see a solution too. Each record has many fields. Two fields I would like to add a little extra functionality to are a check box and a combo box. More explicitly, I would like the 'enabled' property of a combo box control to be dependent on the value of a check box (a 'yes/no' field) in the same...
2
946
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about making this work...
3
1864
by: fstenoughsnoopy | last post by:
Ok the complete story. I have a Contact Table, Query and Form, that are used to input and store the contact info for customers. They have FirstName, LastName and Address as the primary key fields to keep out duplicates. I am trying to put a full name box on the query, that uses the FirstName, LastName and Middle Initial and puts them together to form a full name. That I have so far. On my order database(consisting of a master table with...
5
5593
by: sphinney | last post by:
Before I state my problem I want to say thanks to anyone who reads this post. I appreciate your time. I have a simple form in an Access 2007 database. The form contains two combo boxes. Combo box 1 contains the names of all the base and linked tables in the database. When the user selects a table name in combo box 1, I want combo box 2 show the list of fields for that table. The code I have to populate combo box 2 with field names...
0
8579
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8232
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
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
5524
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
4032
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
4098
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1403
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.