By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.