473,434 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

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 1649
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.Column(1)

Sep 13 '06 #2

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

Similar topics

3
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...
2
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...
1
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...
0
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:...
9
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
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...
2
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...
3
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...
5
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
1
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...
0
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,...
0
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...
0
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...

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.