Lookup based of part of field

  • Thread starter Thread starter Tom Rector
  • Start date Start date
T

Tom Rector

Aceess 2000 XP home, 256K 1.8ghz

Thanks again in advance, you guys have made me look good more than
once !!

I have a text(50)field (Event) in a table (Main). I have a
interger field (3)(RuleNumb) in the same table. I have another table
(Rule) that has a text field(254)(RulesText) with a an interger field
(3)(NumbRule) also. This table also has a text filed (15)
(Reference).

What I want to happend is when I type in the word "Promotion" as
part of the Main.Event field, that it will go to the Rule table and
retun the Rule.NumbRule that matches the Reference to Main.RuleNumb.
An example would be"

Main
Main.Event
"Enlisted Monthly Promotion Ceremony"

Rule.
Reference NumbRule RulesText

Promotion 4 Yaddda ,yadda,yadda
Retirement 6 SoSo,SoSo,SoSo
Awards 9 HoHum,hoHum

I want to return the interger 4 to Main.RuleNumb. If I had typed in
"MSgt Oldtime's Retirement Ceremony" I would want it to return the
interger 6 to Main.RuleNumb.

Again, thanks for your help, I do appreciate it.

Thomas Rector
(e-mail address removed)
 
Just build a comb box with the wizard.

Make the first column in the combo box the number value (you can hide this
is you set the width of the first column to 0), the 2nd column will be the
Reference field. Ms-access will search by this field, but in fact return the
first column. What is even more cool here is that it will display the
Reference field, but in fact store he numbRule field. And, if you wish, you
can actually display the 3 column in that combo also.

So, try building the combo box with the wizard, as it will do what you ask.
 
Back
Top