D
DIH
Hi all,
I have a subreport based on a query called, "qryOrderDetails".
I want to make dollar sign labels visible only on the first detail record.
Here is the code I have managed to gather from some internet searching
(I'm just starting to learn some vba)
Dim qdf As QueryDef, rst As Recordset
Set qdf = DBEngine(0)(0).QueryDefs("qryOrderDetails")
Set rst = qdf.OpenRecordset()
If rst.AbsolutePosition = 0 Then
Me.lbldollar1.Visible = True
Else
Me.lbldollar1.Visible = False
End If
Here is how I want the report to look:
QTY U/M DESC PRICE TOTAL
2 EA STAPLES $ 2.99 $ 5.98
3 EA CLIPS 1.50 4.50
1 BOX PENS 10.95 10.95
ETC.... (notice the dollar signs are visible only for the first record
for "STAPLES")
The code above however shows dollar signs for every record. I think I
need some kind of FOR EACH, NEXT statement but I'm not sure how to write
it. Any help is greatly appreciated.
Dave
I have a subreport based on a query called, "qryOrderDetails".
I want to make dollar sign labels visible only on the first detail record.
Here is the code I have managed to gather from some internet searching
(I'm just starting to learn some vba)
Dim qdf As QueryDef, rst As Recordset
Set qdf = DBEngine(0)(0).QueryDefs("qryOrderDetails")
Set rst = qdf.OpenRecordset()
If rst.AbsolutePosition = 0 Then
Me.lbldollar1.Visible = True
Else
Me.lbldollar1.Visible = False
End If
Here is how I want the report to look:
QTY U/M DESC PRICE TOTAL
2 EA STAPLES $ 2.99 $ 5.98
3 EA CLIPS 1.50 4.50
1 BOX PENS 10.95 10.95
ETC.... (notice the dollar signs are visible only for the first record
for "STAPLES")
The code above however shows dollar signs for every record. I think I
need some kind of FOR EACH, NEXT statement but I'm not sure how to write
it. Any help is greatly appreciated.
Dave