473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Access Report : Calculated field3 = field1 + field2

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
1 3031
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike | last post by:
Hi, I have an Access report which has two fields from a database on it. I have a third field which is just a textbox that divides one by another. My question/problem is that if the dividing...
2
by: FZ | last post by:
Hi all, Was wondering if someone could answer this report question for me. What I want to do is print 2 columns on the report, with each column's data pulling from the same fields. BUT, I want...
3
by: Art | last post by:
Hi, I have a small table in an Access database, each record has 3 fields. I want to store 3 values into a record. I looked at the view SQL in Access and saw the following: INSERT INTO...
2
by: rjgst3 | last post by:
I'm trying to export a reference table from MS Access to a table via ODBC. Is there a way I can use a DAO.Recordset and use the value(field) to populate my ODBC table? Dim rs as DAO.Recordset...
1
by: rdemyan via AccessMonster.com | last post by:
I'm getting an error on the following delete query, which says to "specify the table containing the records you want to delete." Here's the delete action query sSQL = "DELETE * FROM As A LEFT...
3
by: AccessThis | last post by:
Hi everyone, I’m fairly new to Access and VBA, but I have set up the following code to export all the records in my database to a word template (C:\Template.dot) with bookmarks (bkfield1,...
3
by: dekker.erik1 | last post by:
hello, I would like to know if there is a way in ms access 2003 to add consequtive numbers to a new column to 'count' the records. This count should start over by every by variable. for example:...
1
by: Euge | last post by:
Hi, I really hope someone will be able to help me with this one as I am sure im just missing something simple. I have an unbound form which has 20 yes/no unbound check boxes. The purpose of...
1
by: katwheels | last post by:
I need to convert a data element from a web page table into an MS Access input parameter and then run another MS Access query. I have an ASP web page that generates an MS Access query and creates...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.