473,387 Members | 1,578 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,387 software developers and data experts.

Access field based on other filed entry

I have a purchase order and inventory database Im working on. It was the standard one available at Microsft for free download ( a template). It works fine, but I need acouple modifications.

I have two different price levels for my suppliers. In other words some of my suppliers who provide me with large amount of product, receive a better price. What I need to happen is when the supplier is selected at the top of the Purchase Order form, I need the pricing for that supplier to automatically show up for each product selected in the subform.

RIght now, (as it had originally been from Microsoft) it doesnt even put the unit price in, I have to manually type it in after choosing a product. I need that to automatically put the price based on the product selected. And also to put the price according to my type of supplier. (I added a column in my suppliers table to indicate which pricing method they are paid)

Any thought, suggestions, and help is appreciated.
Aug 14 '07 #1
2 1108
JConsulting
603 Expert 512MB
I have a purchase order and inventory database Im working on. It was the standard one available at Microsft for free download ( a template). It works fine, but I need acouple modifications.

I have two different price levels for my suppliers. In other words some of my suppliers who provide me with large amount of product, receive a better price. What I need to happen is when the supplier is selected at the top of the Purchase Order form, I need the pricing for that supplier to automatically show up for each product selected in the subform.

RIght now, (as it had originally been from Microsoft) it doesnt even put the unit price in, I have to manually type it in after choosing a product. I need that to automatically put the price based on the product selected. And also to put the price according to my type of supplier. (I added a column in my suppliers table to indicate which pricing method they are paid)

Any thought, suggestions, and help is appreciated.
Let's do this in pieces.

First, where are you storing the price level? is it available on the main form?

in order to find your price you'll need the product or productId associated with it. You'll need to be able to look at the product table and determine what the price level is.

So let's say you have your tables built correctly.

in the after update event of your Supplier combo you might do something like so

[code=vba]

me.mypricefield = DLookup("Price","ProductTable","ProductID=" & me.productID & " and PriceLevel=" & me.PriceLevel & ")"

[\code]

this assumes you have in your tables the fields needed to look up the price. The source table in this instance could be a query that would return this data relationship.
Hope it helps out.
J
Aug 15 '07 #2
JustJim
407 Expert 256MB
So let's say you have your tables built correctly.
Microsoft built this, what are the chances???

Just (joking) Jim
Aug 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: qsweetbee | last post by:
I have a form(fAddUsers) in my database. It is continue form for data entry. Some fields are required fields. Some are optional fields. There is 1 particular filed(TokenExpirationDate)on the form...
4
by: N. Graves | last post by:
Hello; I have a table that is equipment. This table has a filed called Owner and that Owner filed is Looked up from a table called employee. and the query request the serial number of the...
4
by: N. Graves | last post by:
Hello; I have a table that is equipment. This table has a filed called Owner and that Owner filed is Looked up from a table called employee. and the query request the serial number of the...
4
by: seryozha | last post by:
Hello, I'm wonder if a relational database is what i need based on the data i will be entering. Our company will have the following data entered: Customer Part Press Date Operation
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.