Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 21st, 2006, 02:05 PM
Reginald Bal
Guest
 
Posts: n/a
Default automatically retrieve value from a range table

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


  #2  
Old February 21st, 2006, 04:15 PM
Allen Browne
Guest
 
Posts: n/a
Default 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]


  #3  
Old February 24th, 2006, 01:45 PM
Reginald Bal
Guest
 
Posts: n/a
Default 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]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles