Need Help

bugman

Registered User.
Local time
Yesterday, 23:29
Joined
Dec 23, 2004
Messages
31
Hi All,

Here's my problem, I have a form with a text box "txtINPCD" and a command button "cmdPreview". On the report I have a text box "txtCopiedINPCD" that gets it's info from the text box "txtINPCD" on the form. The control source of the report text box "txtCopiedINPCD" is:

=[Forms]![frmServiceID]![txtINPCD].

The form text box "txtINPCD" doesn't have a control source.

Ok now, when I open the report the text box "txtCopiedINPCD" shows the same text as the form text box "txtINPCD". This works fine, however on the report there is a control called InspecCode which is connected to the Record Source of the Report.

What I want to do is when the InspecCode.Value or .Text = txtCopiedINPCD.Value or .Text, it will make another text box (unbound) "txtCharge" = 250.00.

I don't know whether to place the code on the form cmdPreview or Reports Open Event or another place. Could someone show me the correct code and where to place it.

Thanks in advance
 
Last edited:
The code goes in the Format event of the report's detail section since it needs to run for each record.
 
I knew it could be done, I just didn't know where. Thanks Pat.
 

Users who are viewing this thread

Back
Top Bottom