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

Replace Function in Access 2000 Report Text Box Control Source Expression Quits Working in Windows 2000

I've had an Access 2000 app running successfully for many months on
both Windows XP and Windows 2000. Recently when my Windows 2000 users
call a particular report, they get first a dialog requesting a
"Replace" parameter. If the user clicks OK, the report opens, but only
displays #Error. When the user tries to close the report, he is next
presented with the choice of halting the code in break mode or not.
Regardless of his choice, the app locks up and the user has to close
the app with Task Manager.

There is a text box on this report with the following expression in
the control source: =Replace([ClassName],"|"," - ") & " Sign-In Sheet"

The Replace Function works fine in VB, so I built the following
workaround:

Public Function FixIt(str As String, sReplace As String, sWith _
As String)
If Not InStr(str, sReplace) = 0 Then
FixIt = Replace(str, sReplace, sWith)
Else
FixIt = str
End If
End Function

I replaced the control source expression above with:
=Fixit([ClassName],"|"," - ") & " Sign-In Sheet"

Voila! It works. But why oh why did the Replace Function spontaneously
combust? Remember, it worked before and it still works on XP machines.
Nov 12 '05 #1
2 2676
It sounds like these machines have JET service pack 7 loaded which was quite
buggy. Upgrade to service pack 8.

Note that Service Pack 7 is a critical patch on Windows Update because it is a
security fix. Service Pack 8 is not a critical update because it is not a
security patch, but a bug fix to a security patch.

On 3 Dec 2003 12:18:20 -0800, sd*****@charter.net (Sharon) wrote:
I've had an Access 2000 app running successfully for many months on
both Windows XP and Windows 2000. Recently when my Windows 2000 users
call a particular report, they get first a dialog requesting a
"Replace" parameter. If the user clicks OK, the report opens, but only
displays #Error. When the user tries to close the report, he is next
presented with the choice of halting the code in break mode or not.
Regardless of his choice, the app locks up and the user has to close
the app with Task Manager.

There is a text box on this report with the following expression in
the control source: =Replace([ClassName],"|"," - ") & " Sign-In Sheet"

The Replace Function works fine in VB, so I built the following
workaround:

Public Function FixIt(str As String, sReplace As String, sWith _
As String)
If Not InStr(str, sReplace) = 0 Then
FixIt = Replace(str, sReplace, sWith)
Else
FixIt = str
End If
End Function

I replaced the control source expression above with:
=Fixit([ClassName],"|"," - ") & " Sign-In Sheet"

Voila! It works. But why oh why did the Replace Function spontaneously
combust? Remember, it worked before and it still works on XP machines.


Nov 12 '05 #2
Wow, Steve, that was quick! Thanks for the noble effort, but it didn't
work. I even tried refreshing all my references after I installed Jet
Service Pack 8.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

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

Similar topics

10
by: pembed2003 | last post by:
Hi all, I asked this question in the C group but no one seems to be interested in answering it. :-( Basically, I wrote a search and replace function so I can do: char source = "abcd?1234?x";...
1
by: Almarni | last post by:
Designed a database in Access 97 that runs on a 2000 server and is accessed by users using Windows 2000 client. Reported that no more than 3 users can use it. There is one database with the...
5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
2
by: Bob | last post by:
I've got a bound report with a query as the record source. I'm adding a total to the footer and have inserted a text box to display it. I'm attempting to set the control source of the text box to...
4
by: VivN | last post by:
I want to use an expression as the control source for a text box in a report (Access 2000). Whilst I have sucessfully used these simple ones =TimeToSingle(TotalHours(,))...
3
by: lodatokab | last post by:
I'm have problem to run crystal report (VS 2005) on my computer with Windows 2000 Server. I run the solution in my dev envroiment (Windows XP) and no problems. When I try to run in on IIS 5.0 on...
0
by: kkrizl | last post by:
I've tried to research this problem, and I haven't been able to find any references to it. Probably because I shouldn't be doing it, but it was working, and now it's not. I'm trying to develop a...
1
by: kkrizl | last post by:
I've tried to research this problem, and I haven't been able to find any references to it. Probably because I shouldn't be doing it, but it was working, and now it's not. I'm trying to develop a...
1
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: I have created an unmanaged DLL using Visual Studio 2005, which was created in Visual C++. I have some functions in the DLL that I am trying to call. When I "dumpbin...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.