If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How sum a value directly from the table where equal to a subform c
Hello all.'
I would like to have this in an before event. Dim StrProducedQty as string I don't know how get this sum... StrProducedQty = sum [Produced_Qty] from table [tbl_WOProduced] where [tbl_WOProduced] is equal to this control on the subform (Work_OrderN) Note: These are my forms and subform names. FormName: frm_Production_Report SubformName: sfrm_WOProduced If StrProducedQty + me.Produced_Qty WOQty Then MsgBox "Qty exceed the valance of the WO, type a lower value than the valance", vbCritical, "Qty exceeded" Cancel = True End If -- Lorenzo DÃ*az Cad Technician |
#2
|
|||
|
|||
How sum a value directly from the table where equal to a subform c
On Wed, 6 May 2009 19:22:07 -0700, ldiaz
wrote: You can get the sum using the DSum function - see help file. -Tom. Microsoft Access MVP Hello all.' I would like to have this in an before event. Dim StrProducedQty as string I don't know how get this sum... StrProducedQty = sum [Produced_Qty] from table [tbl_WOProduced] where [tbl_WOProduced] is equal to this control on the subform (Work_OrderN) Note: These are my forms and subform names. FormName: frm_Production_Report SubformName: sfrm_WOProduced If StrProducedQty + me.Produced_Qty WOQty Then MsgBox "Qty exceed the valance of the WO, type a lower value than the valance", vbCritical, "Qty exceeded" Cancel = True End If |
#3
|
|||
|
|||
How sum a value directly from the table where equal to a subfo
that does not work if I want to eliminate extra fields on the subform..
I want a string -- Lorenzo DÃ*az Cad Technician "Tom van Stiphout" wrote: On Wed, 6 May 2009 19:22:07 -0700, ldiaz wrote: You can get the sum using the DSum function - see help file. -Tom. Microsoft Access MVP Hello all.' I would like to have this in an before event. Dim StrProducedQty as string I don't know how get this sum... StrProducedQty = sum [Produced_Qty] from table [tbl_WOProduced] where [tbl_WOProduced] is equal to this control on the subform (Work_OrderN) Note: These are my forms and subform names. FormName: frm_Production_Report SubformName: sfrm_WOProduced If StrProducedQty + me.Produced_Qty WOQty Then MsgBox "Qty exceed the valance of the WO, type a lower value than the valance", vbCritical, "Qty exceeded" Cancel = True End If |
Thread Tools | |
Display Modes | |
|
|