H
HSalim
Hi All:
it has been so long since I programmed reports and I have forgotten
everything or everything has changed.
Here are two tasks that I am struggling with.
Report is based off a query. qrySalesHeader
Report has subReport baed on qrySalesItems.
ON main report, I have a textbox - txtBillAddress:
ControlSource: =ConcatAddress(BillAddr1, BillAddr2, BillAddr3)
BillAddr1,2,3 are columns in qrySalesHeader; ConcatAddress is a function
that nicely formats the three address lines and removes unneeded spaces.
Similarly I have a textbox - txtShipAddress.
Question:
1. Instead of binding txtBillAddress to the three columns, I wanted to leave
it unbound and set the value at run time, say in the
GroupHeader Formatevent
For example
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.TxtBillToAddr = ConcatAddress([BillAddr1], [BillAddr2], [BillAddr3])
Me.TxtBillToCityZip = ConcatCityZip([BillCity], [BillState], [BillZip])
This does not work of course, nor does
ConcatAddress([qrySalesHeader].[BillAddr1], ...
What is the right syntax?
2.If Me.TxtBillAddress = Me.txtShipAddress Then
Subreport.txtUnitCost = 0
subreport..ExtendedCost = 0
Cant figure out how to set these values programatically.
I recall that the syntax was something like
Reports.Subreport.txtUnitCost.Value = 0
but I cant recall the exact syntax and am stumped.
(I remember the help files used to have detailed information on this but not
in the current versions...
What a pity.)
So, can someone help! Please!
Thanks and regards
Habib
Subreport
it has been so long since I programmed reports and I have forgotten
everything or everything has changed.
Here are two tasks that I am struggling with.
Report is based off a query. qrySalesHeader
Report has subReport baed on qrySalesItems.
ON main report, I have a textbox - txtBillAddress:
ControlSource: =ConcatAddress(BillAddr1, BillAddr2, BillAddr3)
BillAddr1,2,3 are columns in qrySalesHeader; ConcatAddress is a function
that nicely formats the three address lines and removes unneeded spaces.
Similarly I have a textbox - txtShipAddress.
Question:
1. Instead of binding txtBillAddress to the three columns, I wanted to leave
it unbound and set the value at run time, say in the
GroupHeader Formatevent
For example
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.TxtBillToAddr = ConcatAddress([BillAddr1], [BillAddr2], [BillAddr3])
Me.TxtBillToCityZip = ConcatCityZip([BillCity], [BillState], [BillZip])
This does not work of course, nor does
ConcatAddress([qrySalesHeader].[BillAddr1], ...
What is the right syntax?
2.If Me.TxtBillAddress = Me.txtShipAddress Then
Subreport.txtUnitCost = 0
subreport..ExtendedCost = 0
Cant figure out how to set these values programatically.
I recall that the syntax was something like
Reports.Subreport.txtUnitCost.Value = 0
but I cant recall the exact syntax and am stumped.
(I remember the help files used to have detailed information on this but not
in the current versions...
What a pity.)
So, can someone help! Please!
Thanks and regards
Habib
Subreport