Connecting Tech Pros Worldwide Forums | Help | Site Map

automatically retrieve value from a range table

Reginald Bal
Guest
 
Posts: n/a
#1: Feb 21 '06
Hello,

I created following tables:[tblSizes] & [tblItems]

[tblSizes]
SizeID (number)--KeyField
WeightFm (number)
WeightTo (number)

Sample data =
Record1: 1.00 (=SizeID) 1.00( = WeightFm) 1.49( = WeightTo)
Record2: 1.50 (=SizeID) 1.50( = WeightFm) 1.99( = WeightTo)
Record3: 2.00 (=SizeID) 2.00( = WeightFm) 2.99( = WeightTo)

[tblItems]
ItemID (number)--KeyField
....
ItemWeight (number)
SizeID
....

Now, everytime I add a new record in tblItems, I will enter the ItemWeight.
The SizeID, however should automatically be retrieved (according to the
ItemWeight) from the table tblSizes.
e.g. ItemWeight = 1.39 ---> SizeID = 1.00
e.g. ItemWeight = 2.19 ---> SizeID = 2.00

How do I accomplish this?

Thanks for any help!

--
Reginald Bal



Allen Browne
Guest
 
Posts: n/a
#2: Feb 21 '06

re: automatically retrieve value from a range table


See Tom Ellison's article:
Lookup in a range of values in a query
at:
http://allenbrowne.com/ser-58.html
for a discusssion of how to go about this.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Reginald Bal" <rbal@rebit.be> wrote in message
news:iYEKf.270883$OW4.9012287@phobos.telenet-ops.be...[color=blue]
> Hello,
>
> I created following tables:[tblSizes] & [tblItems]
>
> [tblSizes]
> SizeID (number)--KeyField
> WeightFm (number)
> WeightTo (number)
>
> Sample data =
> Record1: 1.00 (=SizeID) 1.00( = WeightFm) 1.49( = WeightTo)
> Record2: 1.50 (=SizeID) 1.50( = WeightFm) 1.99( = WeightTo)
> Record3: 2.00 (=SizeID) 2.00( = WeightFm) 2.99( = WeightTo)
>
> [tblItems]
> ItemID (number)--KeyField
> ...
> ItemWeight (number)
> SizeID
> ...
>
> Now, everytime I add a new record in tblItems, I will enter the
> ItemWeight.
> The SizeID, however should automatically be retrieved (according to the
> ItemWeight) from the table tblSizes.
> e.g. ItemWeight = 1.39 ---> SizeID = 1.00
> e.g. ItemWeight = 2.19 ---> SizeID = 2.00
>
> How do I accomplish this?
>
> Thanks for any help!
>
> --
> Reginald Bal[/color]


Reginald Bal
Guest
 
Posts: n/a
#3: Feb 24 '06

re: automatically retrieve value from a range table


Tx Allen this article helped me to solve my problem.

"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:43fb39dd$0$12207$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=blue]
> See Tom Ellison's article:
> Lookup in a range of values in a query
> at:
> http://allenbrowne.com/ser-58.html
> for a discusssion of how to go about this.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Reginald Bal" <rbal@rebit.be> wrote in message
> news:iYEKf.270883$OW4.9012287@phobos.telenet-ops.be...[color=green]
>> Hello,
>>
>> I created following tables:[tblSizes] & [tblItems]
>>
>> [tblSizes]
>> SizeID (number)--KeyField
>> WeightFm (number)
>> WeightTo (number)
>>
>> Sample data =
>> Record1: 1.00 (=SizeID) 1.00( = WeightFm) 1.49( = WeightTo)
>> Record2: 1.50 (=SizeID) 1.50( = WeightFm) 1.99( = WeightTo)
>> Record3: 2.00 (=SizeID) 2.00( = WeightFm) 2.99( = WeightTo)
>>
>> [tblItems]
>> ItemID (number)--KeyField
>> ...
>> ItemWeight (number)
>> SizeID
>> ...
>>
>> Now, everytime I add a new record in tblItems, I will enter the
>> ItemWeight.
>> The SizeID, however should automatically be retrieved (according to the
>> ItemWeight) from the table tblSizes.
>> e.g. ItemWeight = 1.39 ---> SizeID = 1.00
>> e.g. ItemWeight = 2.19 ---> SizeID = 2.00
>>
>> How do I accomplish this?
>>
>> Thanks for any help!
>>
>> --
>> Reginald Bal[/color]
>
>[/color]


Closed Thread


Similar Microsoft Access / VBA bytes