Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Access Report : Calculated field3 = field1 + field2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
verb13@hotmail.com - 28 Feb 2006 19:28 GMT
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)
fredg - 28 Feb 2006 20:41 GMT
> 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
[quoted text clipped - 6 lines]
>
> (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)
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.