Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show previous balance on report

Status
Not open for further replies.

BrianLe

Programmer
Feb 19, 2002
229
US
In AC97, I need help getting a previous balance into a report. In the report I want to show the following

Beginning Ending
Date Inventory B1Belt B2Belt Adjustments Inventory


for each day between the start and end date.

I'm using form frmStackingTubeInventoryReport to select the start and end dates. It has a toggle button with event procedure

Code:
Private Sub Toggle10_Click()
DoCmd.OpenReport "Stacking Tube Inventory - Short Range", acViewPreview
End Sub

I'm using the following query qryStackingTubeInventory to get the B1Belt, B2Belt, and Adjustment values for the report.

Code:
SELECT tblBeltScales.B1Belt, tblBeltScales.B2Belt, tblBeltScales.PileAdjustment,tblBeltScales.StackingTubeAdjustment
FROM tblBeltScales
WHERE DateValue([tblBeltScales].[WeightDate]) Between
   [Forms]![frmStackingTubeInventoryReport]![tbxStartDate] And
   ([Forms]![frmStackingTubeInventoryReport]![tbxEndDate]);

I've found how to get the previous balance with the following query named "tblBeltScales Query".

Code:
SELECT Sum(nz([B1Belt],0)-nz([StackingTubeAdjustment],0)-nz([B2Belt],0)) AS Balance
FROM tblBeltScales
WHERE DateValue([tblBeltScales].[WeightDate]) < ([Forms]![frmStackingTubeInventoryReport]![tbxEndDate]);

However, I can't figure out how to get the beginning balance into the report, since the report forms Record Source is qryInventoryStackingTube, and it doesn't have a control source for beginning inventory.

I've tried a text box for the beginning inventory with a control source
Code:
=[tblBeltScales Query]![Balance]

but I get the message "Enter Parameter Value tblBeltScales Query"

Any suggestions?

Thanks,

Brian


 
Please disregard. I've reposted on the Query forum.

Thanks,

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top