Dlookup problem on a report

  • Thread starter Thread starter Veli Izzet
  • Start date Start date
V

Veli Izzet

Hi all,

I have a report (invoice) where I list the products, their prices and
totals.

From time to time I need to print this invoice in usd instead of local
currency.

I can do a lookup on the report and get the rate.I get the rate and
print it on the header section of the invoice. (Text137)

However I cannot multiply this value with the unit prices in local
currency to convert them to usd. It seems the report does not consider
the value to be numeric.

What can I do?

The report is called from a form (frmSales) with subform(
frmSalesDetails) with a button. The code for the button is:

Private Sub Command72_Click()
On Error GoTo Err_Command72_Click

Dim stDocName As String

If (BelgeTip = "Fatura") Then
stDocName = "YTLFatura"
Else
stDocName = "Teslimat Belgesi"
End If

DoCmd.OpenReport stDocName, acPreview, "Satislar Filtre"


The rate is also present on the form.
 
What are you doing to do the multiplication? Is it being done in the VBA
module behind the form or are you creating a calculated textbox to show the
result? What is the actual entry you've made to do the multiplication? Where
is the textbox that you want the answer in located?
 
It is being done (apparantely NOT being done) on the detail section with
a calculated field.

The Dlookup field is Text137. There I have the rate as like: 1,3425.

On the detail field I have a control for the local currency, I put a
calculated textbox with the value =LocalCurrency*[Text137] and I get
nothing.

I also tried to put Text137 to the detail section, the same.

BTW, I also want to pass two more parameters from the form to the
report, namely Commision and VAT.

So maybe I can add something to the VBA module that calls the report,
but I do not know the syntax.
 
You say that in the detail section that you have a control for
LocalCurrency. What is the name of this control? What does it contain, a
number? If so, then try enclosing LocalCurrency in your equation in brackets
(=[LocalCurrency]*[Text137]).

To get values from the form, if the form is open you can simply refer to the
controls on the form to get their values.

=Forms!frmMyForm!ctlMyControl

--
Wayne Morgan
MS Access MVP


Veli Izzet said:
It is being done (apparantely NOT being done) on the detail section with a
calculated field.

The Dlookup field is Text137. There I have the rate as like: 1,3425.

On the detail field I have a control for the local currency, I put a
calculated textbox with the value =LocalCurrency*[Text137] and I get
nothing.

I also tried to put Text137 to the detail section, the same.

BTW, I also want to pass two more parameters from the form to the report,
namely Commision and VAT.

So maybe I can add something to the VBA module that calls the report, but
I do not know the syntax.


Wayne said:
What are you doing to do the multiplication? Is it being done in the VBA
module behind the form or are you creating a calculated textbox to show
the result? What is the actual entry you've made to do the
multiplication? Where is the textbox that you want the answer in located?
 
Back
Top