473,566 Members | 3,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TABLE LOOKUPS FROM PRICE MATRIX

Hi All.
I need some help trying to pull prices from a price matrix. Here's an
example:

1000 1500 2000 2500
-----------------------------------------
1000 ¦ 10.20 11.95 12.55 13.76

1500 ¦ 11.23 12.23 13.45 14.45

2000 ¦ 12.99 13.56 14.71 15.62
Let me explain. The header row is millimetres, and indeed relates to
the width of a window. The first column is also in millimetres, and
relates to the height of a window. The data are prices in GBP.

From this table, I can work out the price of a window depending on
it's size. For example, a window of 1000w x 1500h is £11.23. A
window of 1100w x 1500h would be £12.23.(This is because the width of
the window breaks the 1000mm price band, and goes into the 1500mm
price band.)

Okay, so far so good. Now then... up until now, in order to get
access 2k to pull this information out of a table format, I have had
to create a table with three fields in a standard access list table
format. The field names are: WIDTH, HEIGHT, PRICE.

I extract the table using a SELECT SQL statement, and it works fine.
(ie - SELECT PRICE from PriceTable WHERE WIDTH >=myWidth AND HEIGHT=myHeight etc). My problem is that I need to allow the user to

create a new price table, and enter the data into an excel style grid
(as shown above), but I just can't work out how I'm supposed reference
the data, or indeed store the data from this format.

If I want to view my standard access table in matrix format, I simply
use a crosstab query to do so. The problem with crosstabs are that
they are not editable, and that still wouldn't answer my question on
how I'm supposed to allow the user to enter the data in the first
place.

I'm aware of the INDEX/MATCH functions from excel, but it's long
winded, and of course relies on calling Excel Dll's.

I've thought about the possiblility of creating a table with say 10
fields, named HEIGHT, WIDTH_1, WIDTH_2 etc etc.... And having the
first row as my width breakpoints, but I can't see how I would
reference that from SQL statements.

Can somebody please help me??

Thanks
Nov 12 '05 #1
3 4780
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just have a form that has the columns (fields) set up the same as the
table's. Why can't a user understand that? It is just as easy to
understand as a matrix (which may expand off the visible part of the
display screen). Just be sure the Height & Width columns are marked as
Primary Keys so no duplicates can be entered.

You could have the above set up & a button on the form that shows the
user the cross-tab results (matrix) of the data they just entered, if
they wanted to see it that way.

If you insist on having a matrix input form:

The form will have to be unbound.
When the user is finished - click a save button.
The save routine will go thru each cell & insert/update the table
records, 1 record/cell at a time. Lots of VBA coding.

--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQIhKeYechKq OuFEgEQI7cACffz +jy47tkIj5Y8QtY pskFgYxVQUAoJ3f
gpxr6C0wWMN6aym yV7rWNwkQ
=efx+
-----END PGP SIGNATURE-----
Gigi.com wrote:
Hi All.
I need some help trying to pull prices from a price matrix. Here's an
example:
> 1000 1500 2000 2500


-----------------------------------------
1000 ¦ 10.20 11.95 12.55 13.76

1500 ¦ 11.23 12.23 13.45 14.45

2000 ¦ 12.99 13.56 14.71 15.62
Let me explain. The header row is millimetres, and indeed relates to
the width of a window. The first column is also in millimetres, and
relates to the height of a window. The data are prices in GBP.

From this table, I can work out the price of a window depending on
it's size. For example, a window of 1000w x 1500h is £11.23. A
window of 1100w x 1500h would be £12.23.(This is because the width of
the window breaks the 1000mm price band, and goes into the 1500mm
price band.)

Okay, so far so good. Now then... up until now, in order to get
access 2k to pull this information out of a table format, I have had
to create a table with three fields in a standard access list table
format. The field names are: WIDTH, HEIGHT, PRICE.

I extract the table using a SELECT SQL statement, and it works fine.
(ie - SELECT PRICE from PriceTable WHERE WIDTH >=myWidth AND HEIGHT
=myHeight etc). My problem is that I need to allow the user to


create a new price table, and enter the data into an excel style grid
(as shown above), but I just can't work out how I'm supposed reference
the data, or indeed store the data from this format.

If I want to view my standard access table in matrix format, I simply
use a crosstab query to do so. The problem with crosstabs are that
they are not editable, and that still wouldn't answer my question on
how I'm supposed to allow the user to enter the data in the first
place.

I'm aware of the INDEX/MATCH functions from excel, but it's long
winded, and of course relies on calling Excel Dll's.

I've thought about the possiblility of creating a table with say 10
fields, named HEIGHT, WIDTH_1, WIDTH_2 etc etc.... And having the
first row as my width breakpoints, but I can't see how I would
reference that from SQL statements.


Nov 12 '05 #2
MGFoster <me@privacy.com > wrote in message news:<OT******* *********@newsr ead2.news.pas.e arthlink.net>.. .
Thanks for the concept. That idea would work fine. Unfortunately,
the data must be entered like this becuase it's very much an industry
standard way of view price tables. It also makes it very easy to copy
data from a price table.
If you can help me with any code it would be appreciated.

Cheers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just have a form that has the columns (fields) set up the same as the
table's. Why can't a user understand that? It is just as easy to
understand as a matrix (which may expand off the visible part of the
display screen). Just be sure the Height & Width columns are marked as
Primary Keys so no duplicates can be entered.

You could have the above set up & a button on the form that shows the
user the cross-tab results (matrix) of the data they just entered, if
they wanted to see it that way.

If you insist on having a matrix input form:

The form will have to be unbound.
When the user is finished - click a save button.
The save routine will go thru each cell & insert/update the table
records, 1 record/cell at a time. Lots of VBA coding.

Nov 12 '05 #3
gi*******@yahoo .co.uk (Gigi.com) wrote in message news:<f5******* *************** ****@posting.go ogle.com>...
MGFoster <me@privacy.com > wrote in message news:<OT******* *********@newsr ead2.news.pas.e arthlink.net>.. .
Thanks for the concept. That idea would work fine. Unfortunately,
the data must be entered like this becuase it's very much an industry
standard way of view price tables. It also makes it very easy to copy
data from a price table.
If you can help me with any code it would be appreciated.

Cheers


This is a very interesting problem. It's much tougher than it looks
to make Access do too much Excel stuff. Some other threads in this NG
talk about using Excel within Access. Since Excel was likely used by
the people who created the industry standard it seems a
non-Access-only solution might be in order. I've had success with
Excel automation from Access but have never tried to embed an Excel
object within Access. Of course having Access emulate Excel
capabilities, though a bit of a kludge, is much better than trying to
use Excel as a database :-). If your Height and Width values vary for
different kinds of windows or your price matrix is over about 15 X 15
then I think you're trying to push Access to do something that is done
better by Excel. Finding prices from the spreadsheet is similar to
what you use currently in SQL except you are traversing the first row
and column instead of Width and Height values in an Access table. It
would be really nice if Access actually had native two and three
dimensional tables that could easily map to arrays. A 3D interface to
change the values would also be nice. Just click up or down to see
the next 2D layer. Er.., click right or left to see the next 2D
layer. Er.., click shallower or deeper to see the next 2D layer.

James A. Fortune

Being poor is best left to those who have no money.
- Taxi
Nov 12 '05 #4

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

Similar topics

2
6576
by: John Mudd | last post by:
I must be missing something here. It's clearly faster to lookup an item directly in a dictionary than to scan through a list. So when I have a large lookup table I always load it in the form of a dictionary. But it seems a waste. I end up having to assign an artificial value to the dictionary entry. Below I assign the value "None" to each...
0
3055
by: B. Fongo | last post by:
I learned MySQL last year without putting it into action; that is why I face trouble in formulating my queries. Were it a test, then you would have passed it, because your queries did help me solve my problem. I'll turn to MySQL doc after getting through this pressing project. Thanks a lot Roger! Babale -----Urspr=FCngliche...
1
3417
by: Stephen Patten | last post by:
Hi All, While in the process of building my table (40 or so Insert statments) can I then query ("select * from @Table_variable") and use the results up to theat point for another insert into @Table_varible? If you look for stepID -15 I have commented that section out due to it not retuning the correct values. Thank you in advance
3
342
by: Gigi.com | last post by:
Hi All. I need some help trying to pull prices from a price matrix. Here's an example: >>>> 1000 1500 2000 2500 ----------------------------------------- 1000 ¦ 10.20 11.95 12.55 13.76 1500 ¦ 11.23 12.23 13.45 14.45
4
2052
by: Paul | last post by:
Hi, When should I use a list (in table properties: like Ford;Mercedes;BMW;Audi ) and when should I use a lookup table?? And second question: IF I use a lookup table, should I always make a relation (1-to-many) in my relation scheme? Any help is greatly appreciated, I'm a bit puzzled.
2
2895
by: King Ron | last post by:
Ola all. In responding to a recent post requesting help with a search issue, I recommended using a combo box lookup in the table design. "paii, Ron" (no relation) posted this reply: " There are many posts in this group explaining the pitfalls of using the lookup feature in tables. Best practice appears to be, keep the lookup in the forms...
3
4403
by: binita2908 | last post by:
Hi guys , I am quite a baby to sql , pls help me out in this . My database scheme consists of four relations: Product(maker, model, type) PC(code, model, speed, ram, hd, cd, price) Laptop(code, model, speed, ram, hd, screen, price) Printer(code, model, color, type, price)
3
1590
by: robert | last post by:
Often I want to extract some web table contents. Formats are mostly static, simple text & numbers in it, other tags to be stripped off. So a simple & fast approach would be ok. What of the different modules around is most easy to use, stable, up-to-date, iterator access or best matrix-access (without need for callback functions,classes.....
23
5707
by: raylopez99 | last post by:
A quick sanity check, and I think I am correct, but just to make sure: if you have a bunch of objects that are very much like one another you can uniquely track them simply by using an ArrayList or Array, correct? An example: create the object, create an array, the stuff the object into the array. Later on, assume the object is mutable,...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.