473,414 Members | 1,781 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,414 software developers and data experts.

Run code in report

Access2003
Me.txtMacpacNumber is an un-bound textbox on a report and
Me.txtRelease and Me.txtSplit are bound textboxes.

I was hoping to run this code in one of the report events but nothing
happens.
Any suggestions?
If Left(Me.txtRelease, 1) = "9" Then
Me.txtMacpacNumber.Value = "/S"
ElseIf Me.txtSplit = "000" Then
Me.txtMacpacNumber.Value = "/M"
Else
Me.txtMacpacNumber.Value = "/S"
End If

Thanks, RICK

Jan 11 '06 #1
4 1398
On 11 Jan 2006 14:47:40 -0800, 2D Rick wrote:
Access2003
Me.txtMacpacNumber is an un-bound textbox on a report and
Me.txtRelease and Me.txtSplit are bound textboxes.

I was hoping to run this code in one of the report events but nothing
happens.
Any suggestions?

If Left(Me.txtRelease, 1) = "9" Then
Me.txtMacpacNumber.Value = "/S"
ElseIf Me.txtSplit = "000" Then
Me.txtMacpacNumber.Value = "/M"
Else
Me.txtMacpacNumber.Value = "/S"
End If

Thanks, RICK


Why in an event?
Use your unbound control itself.

It appears the only values to be displayed will be either "/S" or
"/M"
As control source for [txtMacpacNumber], write:

=IIf([txtSplit] = "000","/M","/S")

The above assumes [txtSplit] is a Text datatype (as you indicate with
= "000").
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jan 11 '06 #2
2D Rick wrote:
Access2003
Me.txtMacpacNumber is an un-bound textbox on a report and
Me.txtRelease and Me.txtSplit are bound textboxes.

I was hoping to run this code in one of the report events but nothing
happens.
Any suggestions?
If Left(Me.txtRelease, 1) = "9" Then
Me.txtMacpacNumber.Value = "/S"
ElseIf Me.txtSplit = "000" Then
Me.txtMacpacNumber.Value = "/M"
Else
Me.txtMacpacNumber.Value = "/S"
End If

Thanks, RICK

Why not make that a function. Call it GettxtMacpacNumber()

In the control source for txtMacpacNumber, enter
=txtMacpacNumber()

Jan 12 '06 #3
Thanks for the reply, It works as advertised.
Rick

Jan 12 '06 #4
Thanks for the reply, I had fredg's solution working before I read
yours.
I appreciate the time you took to answer.
Rick

Jan 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AR Hall | last post by:
This code goes through 3 work sheets in the same XL workbook, day, eve and night shift in each sheet their are columns representing production work orders and reject and downtime for each order...
2
by: | last post by:
I have a breakpoint in an aspx page that I'm using to try to trap some code to see what's going on. I'm translating a page that is working in a traditional ASP page, which takes several session...
6
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
29
by: Rocky86 | last post by:
need help with this code currently I understand abit of what this code is doing but I need to make use of the same logic to send my data to actionscripts so how do I do it? This is the code logic:...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
7
by: martin DH | last post by:
Hello, I have a report that I open that pull its data from a form that builds a where string. Opening the report first opens the form, where I enter criteria, and then pulls matching records from a...
10
by: paul814 | last post by:
I am having a bit of a problem with some code....can someone give me some suggestions? Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\production \date2.php on line 28 line 28 is...
10
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
1
by: prpradip | last post by:
In my application ListView is inside panel (XP theme enable), item text in the ListView control overlaps other items in small icon view. The items are drawn as if aligned to a grid and this causes...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.