2 Values from one cbo?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table called "Sections" and a table of "SectionRates", many of the
sections only have one rate but a few have several - hence the split.
However on a form I want the user to only have to select the section and rate
on one cbo and then store the sectionid and sectionrateid back on the table.
(I can get the rate to appear on the form but I can't seem to get the rateid
to store to the table)

At the moment I have linked combos which works fine, but means selecting
first the section and then the rate.

Thanks
 
hi Helen,
I have a table called "Sections" and a table of "SectionRates", many of the
sections only have one rate but a few have several - hence the split.
However on a form I want the user to only have to select the section and rate
on one cbo and then store the sectionid and sectionrateid back on the table.
The RowSource must be a JOIN between your to tables, e.g.
SELECT R.SectionRate_ID, S.Section_Name, R.SectionRate_Value FROM
Sections S INNER JOIN ON S.Section_ID = R.Section_ID;

The first columne is the bound one.

mfG
--> stefan <--
 
stefan hoffmann said:
hi Helen,

The RowSource must be a JOIN between your to tables, e.g.
SELECT R.SectionRate_ID, S.Section_Name, R.SectionRate_Value FROM
Sections S INNER JOIN ON S.Section_ID = R.Section_ID;

The first columne is the bound one.

mfG
--> stefan <--

Ah ha - so I only need to store the r.SectionRateID in my table - since this
identifies both the section and the rate.

Many thanks
 
Actually that has solved one problem - however I would still like to store
the SectionId - from the sections table, and I still can't do that. (I'm
trying to produce a report by sections and all I now have are the section
rates - I guess I could "find" the section from this...)

Any thoughts?
 
hi Helen,
Actually that has solved one problem - however I would still like to store
the SectionId - from the sections table, and I still can't do that. (I'm
trying to produce a report by sections and all I now have are the section
rates - I guess I could "find" the section from this...)

Any thoughts?
A record source similar to
SELECT R.SectionRate_ID, S.Section_ID, S.Section_Name,
R.SectionRate_Value FROM
Sections S INNER JOIN ON S.Section_ID = R.Section_ID;
in your report :) You can add section name etc. in the query.

mfG
--> stefan <--
 
Back
Top