473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
Feb 21 '06 #1
2 2603
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" <rb**@rebit.be> wrote in message
news:iY**********************@phobos.telenet-ops.be...
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

Feb 21 '06 #2
Tx Allen this article helped me to solve my problem.

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:43***********************@per-qv1-newsreader-01.iinet.net.au...
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" <rb**@rebit.be> wrote in message
news:iY**********************@phobos.telenet-ops.be...
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


Feb 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: netsurfer | last post by:
Hi: Have a question on making the date automatically filled in by what the user enters in by the date at the top. The date entered at the top would most likely be on a Wednesday then I need...
0
by: yatharth | last post by:
Hi Well i tell you the situation , i am having the configsection settings like below. what i need to do is to display the sections automatically when i add new section name. after this...
5
by: Mads Petersen | last post by:
Hi, and thanks for previous help. I use following code to export from excel to access. It is executed in excel. I have an excel spreadsheet with one sheet pr. week. this code is therefore...
11
by: Gary | last post by:
I'm using Access 2002. I have a field called Job No. It is a text (data type). The reason being that there is an "I" in front of each number i.e. I1234 I1235 etc The problem is that when...
5
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be...
9
by: Jeremy | last post by:
I have a situation where i am trying to run two query's and retrieve one record from each query, then using Union combine them into one recordset. The First Query is strait forward and should just...
10
by: RoadRunner | last post by:
Hi, I have a employee vacation database that has a vacation table that has the employee name, pay week and date of vacation. I have another lookup table with pay week code and date range for the...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
5
by: jazznojive | last post by:
I've created a textbox control on a userform and I am trying to figure out how to make the text populate to a worksheet range in sequence automatically. I've figued out how to get the text that the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.