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

Updating multiple field automatically

Hi there...

This is my first time asking the question here so bear with me...

I have two tables..
1. Products
2. OrderDetails

The fields in Products are as follows

1. ProductID
2. Product Name
3. unit Price
4. BuyDate
5. SellDate


The fields in OrderDetails are as follows:

1.ProductID
2.Quantity
3.UnitPrice
4.Subtotal
5.BuyDate
6.SellDate
7.OrderDetailsID - Primary
8. OrderID

I want to have the order details form to lookup the values from product table i.e. field 2 - 5. Ive used the dlookup but in the form only the unit price appears but buydate and selldate does not..
the dlookup function is from macro..the code are as follows


DLookUp("UnitPrice","Products","ProductID = " & [ProductID])


any ideas?
Mar 13 '07 #1
2 1178
MMcCarthy
14,534 Expert Mod 8TB
Hi there...

This is my first time asking the question here so bear with me...

I have two tables..
1. Products
2. OrderDetails

The fields in Products are as follows

1. ProductID
2. Product Name
3. unit Price
4. BuyDate
5. SellDate


The fields in OrderDetails are as follows:

1.ProductID
2.Quantity
3.UnitPrice
4.Subtotal
5.BuyDate
6.SellDate
7.OrderDetailsID - Primary
8. OrderID

I want to have the order details form to lookup the values from product table i.e. field 2 - 5. Ive used the dlookup but in the form only the unit price appears but buydate and selldate does not..
the dlookup function is from macro..the code are as follows


DLookUp("UnitPrice","Products","ProductID = " & [ProductID])


any ideas?
You would have to do a DLookup for each value. How do you want it displayed on the form?
Mar 13 '07 #2
NeoPa
32,556 Expert Mod 16PB
You need to revisit your table layout.
BuyDate & SellDate should not be fields in the Product table.
Mar 15 '07 #3

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

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
6
by: Hasanain F. Esmail | last post by:
Hi all, I sincerly thank you all in advance for your help to solve this problem. I have been trying to find a solution to this problem for sometime now but have failed. I am working on a...
3
by: Tc | last post by:
Hi, I was curious, I am thinking of writing an application that loads a dataset from a database that resides on a server. The question I have is this, if multiple copies of the app will be...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
0
by: oh4real | last post by:
I recently developed a compact function to efficiently allow users to change info in a form (like account info, contact info, etc.) and then the function automatically identifies what's changed and...
3
by: Ciara9 | last post by:
I am having problems trying to update a field in a database using a field in a form. I currently have two fields, Today and Tomorrow in a table named Date. The Today field automatically defaults to...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.