Carnafex
Registered User.
- Local time
- Today, 23:39
- Joined
- Jan 19, 2004
- Messages
- 38
A little problem has arising when trying to display particular values in a report. The setup is like this: the report displays a part number, and then any orders for that part. (Important part is underlined.) For example:
SS1010: Control Box
Issued: 1/2/04 Some info Quanity
Issued: 2/2/03 Some Info Quanity
SS1040: R/H Side Control
...etc
I get the quantity from a List Box I created (it has 2 columns, PartNo and Quantity) and then place it in the code. Strangely though only the last quantity in the list will be displayed.
So for example, part A is ordered 20 times, part B 30, but when I run the code below, it says the quantity for both is 30. Heres the code I use.
Where IndReportSetup is the form with the listbox, ListQty is the listbox itself, and TextQty is the text field on the report that I want to display my quantity.
If you need any more info, just ask and Ill post it. Any help with my problem would be greatly appreciated.
Thanks
Jason
SS1010: Control Box
Issued: 1/2/04 Some info Quanity
Issued: 2/2/03 Some Info Quanity
SS1040: R/H Side Control
...etc
I get the quantity from a List Box I created (it has 2 columns, PartNo and Quantity) and then place it in the code. Strangely though only the last quantity in the list will be displayed.
So for example, part A is ordered 20 times, part B 30, but when I run the code below, it says the quantity for both is 30. Heres the code I use.
Code:
[b]private sub Report_OnFormat()[/b]
If (QtyChk < QtyCRC) then
TextQty = Forms!IndReportSetup!ListQty.Column(1, QtyChk)
else
exit sub
end if
QtyChk = QtyChk +1
[b]end sub[/b]
[b]private sub Report_Open()[/b]
QtyCRC = Forms!IndReportSetup!ListQty.ListCount
[b]end sub[/b]
Where IndReportSetup is the form with the listbox, ListQty is the listbox itself, and TextQty is the text field on the report that I want to display my quantity.
If you need any more info, just ask and Ill post it. Any help with my problem would be greatly appreciated.
Thanks
Jason