Unit price not showing up

torquay

Registered User.
Local time
Today, 22:54
Joined
Dec 27, 2005
Messages
85
Hopefully someone can point me in the right direction.
I have a very simple db for customers and sales.
Tables are as follows
Customers: CustomerID, Name, Address etc
Products: ProductID, Model Number, Unit Price, Description, Cost Price
Orders: OrderID, CustomerID, Order Date, Delivery Charge, Delivery Date
Order Details: OrderDetailID, OrderID, ProductID, Quantity, Unit Price,
Discount.

I have an order entry form containing customer name and address with a subform based on a query containing OrderID (from OrderDetials table), ProductID (Orderdetails table), Description (products table), Quantity (orderdetails table), Unit Price (order details table), Discount (order details table), total (calculated field based on quantity * Unit price - Discount.

The problem I am encountering is that on the subform when I click productID box a dropdown appears with all of the models available, I choose any one of them and the product description appears (perfect) but the Unit price is blank. Now I can change the query to get the unit price from the products table but then it wont appear in the order details table, plus I don't want the user to be able to change the price on the products table.

I have seen many examples of this working correctly but for some reason I cannot make it happen on my db...rather frustrating.

Thanks for any help or guidance. Kim
 
Hopefully someone can point me in the right direction.
I have a very simple db for customers and sales.
Tables are as follows
Customers: CustomerID, Name, Address etc
Products: ProductID, Model Number, Unit Price, Description, Cost Price
Orders: OrderID, CustomerID, Order Date, Delivery Charge, Delivery Date
Order Details: OrderDetailID, OrderID, ProductID, Quantity, Unit Price,
Discount.

I have an order entry form containing customer name and address with a subform based on a query containing OrderID (from OrderDetials table), ProductID (Orderdetails table), Description (products table), Quantity (orderdetails table), Unit Price (order details table), Discount (order details table), total (calculated field based on quantity * Unit price - Discount.

The problem I am encountering is that on the subform when I click productID box a dropdown appears with all of the models available, I choose any one of them and the product description appears (perfect) but the Unit price is blank. Now I can change the query to get the unit price from the products table but then it wont appear in the order details table, plus I don't want the user to be able to change the price on the products table.

I have seen many examples of this working correctly but for some reason I cannot make it happen on my db...rather frustrating.

Thanks for any help or guidance. Kim

ok on the after update properties on the drop down box you need to add some coding -

now your drop down box should be tied to a qry and the qry sahould have this value in it as one of the coloumns (lets say itthe 3rd from the left - which to access is actual the 2nd to the left - access starts count 0,1,2 rather than 1,2,3

now your field on your form let call it formvalue

code requireds
afterdate........

formvalue=comboboc.coloumn(2) for the third colmn on your qry
refresh.
 
have a look at the flash customer table for an example

form customer

then look at the code

if you don't want some field to be edited then don't allow then to be onth e form allow edits no or allow enable no
 

Attachments

Perfect, thanks for the speedy reply. Works a treat.
 
I like the easy problems

but if you have any grief - put a post up and we'll try and sort it

g
 

Users who are viewing this thread

Back
Top Bottom