By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,491 Members | 1,868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,491 IT Pros & Developers. It's quick & easy.

Access Report : Calculated field3 = field1 + field2

P: n/a
I have 2 text fields in a report coming from a recordset. I want to
have a third field which will contain the result of some complex string
manipulation of the 2 fields. How can I achieve this? The idea is like
that:

Private Sub Report_Page()
Me.txtField3 = StringMalipulationFunction (txtField1, txtField2)
End Sub

(I don't know much about Access VBA)

Feb 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 28 Feb 2006 11:28:09 -0800, ve****@hotmail.com wrote:
I have 2 text fields in a report coming from a recordset. I want to
have a third field which will contain the result of some complex string
manipulation of the 2 fields. How can I achieve this? The idea is like
that:

Private Sub Report_Page()
Me.txtField3 = StringMalipulationFunction (txtField1, txtField2)
End Sub

(I don't know much about Access VBA)


'Complex string manipulation'?
It would have been nice to know what it is, as what is complex to you
might be quite simple to others and the answer different.

1) Set the control source of an unbound control ([txtField3]) to:
=StringMalipulationFunction (txtField1, txtField2)

no other code needed..

or.....

2) Page is not the correct event. It's too late in the report printing
process.
Place an unbound control in the report.
Let's say it's placed in the Detail section.

Code the Detail Format event:
Me![txtField3] = StringMalipulationFunction (txtField1, txtField2)
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.