X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Using Vb To Sumarise Hours Per Part, Access 2016    
post Oct 31 2019, 06:41 AM

Posts: 64
Joined: 16-October 19
From: United Kingdom

I currently have a finished job form, this form is defined on a works order number and a document number. At my company people however will be machining items which are under the same drawing number and a different works order number. I have made my job start form say which jobs are in progress by using a subform which i identifies any drawing numbers the same which are not marked as complete. My problem now is trying to split the hours which they have spent on a job into two different lines on a subform in my job complete form. At the moment:

Previous op Time = sum(machinetimefromsubform)

(optime + Previous op time)/sum(qtypartsfromsubform) = Time Per Part

(Time per part x Qtyfromsubform) + machinetimefromsubform = newmachinetime

i have tried doing this through a mixture of expressions and visual basic however cannot seem to get it working. Any suggestions???
Go to the top of the page
tina t
post Oct 31 2019, 01:52 PM

Posts: 6,187
Joined: 11-November 10
From: SoCal, USA

let's back up and start with the data. pls post your tables structure and relationships. example:

ProductID (primary key, autonumber)
ProductName (text)

OrderID (primary key, autonumber)
OrderDate (date/time)
CustomerID (foreign key from tblCustomers)

DetailID (pk, autonumber)
OrderID (foreign key from tblOrders)
ProductID (fk from tblProducts)
Quantity (number)

tblProducts.ProductID 1:n tblOrderDetails.ProductID
tblOrders.OrderID 1:n tblOrderDetails.OrderID

one product may be included in many orders, and one order may include many products.


"the wheel never stops turning"
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    15th December 2019 - 03:35 AM