473,407 Members | 2,326 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,407 software developers and data experts.

CStr$ Function in Office 2007

My database, built in Access 2000 but opened in Access 2007 does not
seem to like the function CStr$ (with the dollar sign after), and
gives me an error message. However, if I change the function to CStr
(no dollar sign), I don't get the error message anymore. Does anyone
know why this would happen?
Aug 25 '08 #1
12 6968
On Aug 25, 1:22*pm, Icarus <tjmos...@gmail.comwrote:
My database, built in Access 2000 but opened in Access 2007 does not
seem to like the function CStr$ (with the dollar sign after), and
gives me an error message. *However, if I change the function to CStr
(no dollar sign), I don't get the error message anymore. *Does anyone
know why this would happen?
My guess is that it's directly related to a USA national debt of 9
trillion 600 billion dollars.
Aug 25 '08 #2
On Aug 25, 4:29*pm, lyle fairfield <lyle.fairfi...@gmail.comwrote:
On Aug 25, 1:22*pm, Icarus <tjmos...@gmail.comwrote:
My database, built in Access 2000 but opened in Access 2007 does not
seem to like the function CStr$ (with the dollar sign after), and
gives me an error message. *However, if I change the function to CStr
(no dollar sign), I don't get the error message anymore. *Does anyone
know why this would happen?

My guess is that it's directly related to a USA national debt of 9
trillion 600 billion dollars.
That is strange. I thought it might be a reference library issue, or
maybe a corrupt database. Who knew that the national debt was
imacting my query design!
Aug 25 '08 #3
I'm pretty sure it's CStr€() now. If not it soon will be. The dollar
sign will be used for a new conversion function TwoBit$() which will
convert American dollars to their real value.

On Aug 25, 4:58*pm, Icarus <tjmos...@gmail.comwrote:
On Aug 25, 4:29*pm, lyle fairfield <lyle.fairfi...@gmail.comwrote:
On Aug 25, 1:22*pm, Icarus <tjmos...@gmail.comwrote:
My database, built in Access 2000 but opened in Access 2007 does not
seem to like the function CStr$ (with the dollar sign after), and
gives me an error message. *However, if I change the function to CStr
(no dollar sign), I don't get the error message anymore. *Does anyone
know why this would happen?
My guess is that it's directly related to a USA national debt of 9
trillion 600 billion dollars.

That is strange. *I thought it might be a reference library issue, or
maybe a corrupt database. *Who knew that the national debt was
imacting my query design!
Aug 25 '08 #4
On Aug 25, 7:15*pm, lyle fairfield <lyle.fairfi...@gmail.comwrote:
I'm pretty sure it's CStr€() now. If not it soon will be. The dollar
sign will be used for a new conversion function TwoBit$() which will
convert American dollars to their real value.

On Aug 25, 4:58*pm, Icarus <tjmos...@gmail.comwrote:
On Aug 25, 4:29*pm, lyle fairfield <lyle.fairfi...@gmail.comwrote:
On Aug 25, 1:22*pm, Icarus <tjmos...@gmail.comwrote:
My database, built in Access 2000 but opened in Access 2007 does not
seem to like the function CStr$ (with the dollar sign after), and
gives me an error message. *However, if I change the function to CStr
(no dollar sign), I don't get the error message anymore. *Does anyone
know why this would happen?
My guess is that it's directly related to a USA national debt of 9
trillion 600 billion dollars.
That is strange. *I thought it might be a reference library issue, or
maybe a corrupt database. *Who knew that the national debt was
imacting my query design!
Wonderful.

Does anyone have a CONSTRUCTIVE answer now?
Aug 25 '08 #5
Destructively speaking, I can attest that there is no CStr$ function
in my copy of Access2007/VBA. This is scarcely surprising as
CStr(Expression) returns a string.
My copy of Access2000 is exactly the same. The CStr$ function does not
exist.

If I type
Debug.Print CStr$(3)
the code editor changes the line to
Debug.Print CStr(3)

So? I see you did not actually assert that CStr$ worked swimmingly in
Access 2000. Does it? If so, is Option Explicit set? Is Break On Error
set? Is it running after a On Error Resume Next directive? Can you
post the whole procedure where it is used so that we may paste it into
Access 2000 and examine how it works? Have you installed Service Pack
817 for Access 2000?

On Aug 25, 7:37*pm, Icarus <tjmos...@gmail.comwrote:
Does anyone have a CONSTRUCTIVE answer now?
Aug 26 '08 #6
It is actually part of a query:

TicketNum: CStr$(Trim$([Ticket Number]))
Aug 26 '08 #7
"Icarus" <tj******@gmail.comwrote in message
news:b5**********************************@v16g2000 prc.googlegroups.com...
It is actually part of a query:

TicketNum: CStr$(Trim$([Ticket Number]))
FWIW, in 15 years of developing in Access (v2 onwards) I've *never* used the
$ sign in a VBA function.

Keith.
www.keithwilby.com

Aug 26 '08 #8
On Aug 26, 9:45*am, "Keith Wilby" <h...@there.comwrote:
"Icarus" <tjmos...@gmail.comwrote in message

news:b5**********************************@v16g2000 prc.googlegroups.com...
It is actually part of a query:
TicketNum: CStr$(Trim$([Ticket Number]))

FWIW, in 15 years of developing in Access (v2 onwards) I've *never* used the
$ sign in a VBA function.

Keith.www.keithwilby.com
I'm in total agreement that it is not necessary, I'm just curious what
is special about Office 2007 that would make it stop working, while
previous versions of Access seem to allow it.
Aug 26 '08 #9
"Icarus" <tj******@gmail.comwrote in message
news:38**********************************@b30g2000 prf.googlegroups.com...

<snip>

I must admit I've never even considered it, but having just tried it, it
does work in A2k3. Not a jot of use to you but is news to me :-)

Keith.

Aug 26 '08 #10
On Aug 26, 10:11*am, "Keith Wilby" <h...@there.comwrote:
"Icarus" <tjmos...@gmail.comwrote in message

news:38**********************************@b30g2000 prf.googlegroups.com...

<snip>

I must admit I've never even considered it, but having just tried it, it
does work in A2k3. *Not a jot of use to you but is news to me :-)

Keith.
I just need to update the queries where CStr$ was used to reflect that
it no longer works. Not a big deal.
Aug 26 '08 #11
Check out the Trim$ as well Trim is wot I use, but I'm a lousy typist so why
add extra symbols.

Phil
"Icarus" <tj******@gmail.comwrote in message
news:b5**********************************@v16g2000 prc.googlegroups.com...
It is actually part of a query:

TicketNum: CStr$(Trim$([Ticket Number]))

Aug 26 '08 #12
Sky
"Icarus" <tj******@gmail.comwrote in message
news:b5**********************************@v16g2000 prc.googlegroups.com...
It is actually part of a query:

TicketNum: CStr$(Trim$([Ticket Number]))
In Access 2003, the Trim$() function only accepts strings and returns
string, whereas Trim() will accept a Null and propagate the Null through.
Other functions are similar, such as Left$ and Left, or Right$ and Right.

In a query, Trim() is probably safer unless it is positively known there are
no nulls. Perhaps the $ variations of these string functions are
undetectably faster, if you know there are no nulls.

The string conversion function CStr() does not accept Nulls in Access 2003,
so it seems there is no reason to have CStr$(). Both work, but neither
accepts nulls. Perhaps they removed CStr$ in Access 2007.

- Steve

Sep 4 '08 #13

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

Similar topics

0
by: fiona | last post by:
Divelements release fully featured Office 2007 style Ribbon control Major component suite designed to mimic the advanced user interface features of Microsoft Office 2007 Dorset, United Kingdom -...
5
by: Andy | last post by:
Just instaled the new Office 2007, and the new layout is really cool. Will there be any upgrades to VS 2005 Pro that will include new controls whith a smilar look and feel as that you get in Office...
4
by: =?Utf-8?B?VA==?= | last post by:
We've been developing an application for a while which allows display of office/pdf etc documents within an iframe in a web browser. However, since installing office 2007 this has stopped working...
0
by: Bill Fallon | last post by:
I am developing a VB.Net application with VS 2005 that opens an Excel workbook and populates the worksheet with data. I started developing the application with Office 2007 installed on my Vista...
7
by: bkdraper via AccessMonster.com | last post by:
I currently have a handful of Access 2000 tools I've written for my office. Here in the next few weeks, the office is getting upgraded to Office 2007. My question is, does anybody know how much...
6
by: cmking | last post by:
I have Office Professional 2000 but would like to upgrade to Office 2007 (Home/Small Business edition) which does not include Access 2007, this because I am buying it myself, and can't afford Office...
1
by: David B | last post by:
Neighbour has got a new `puter which came with Office 2007 (without Access ) He needs Access to run an app for his business. He still has a copy of Office 2000 Pro. Are there any issues with...
10
by: prakashwadhwani | last post by:
Office 2007 & thus Access has had it's menus replaced with the Ribbon Bar. It's very disconcerting. In Word, Excel, Access, I feel totally lost. Also all the shortcut Menu pulldowns don't work...
0
by: ray007x | last post by:
I have a question for Beth Melton. Hello. This is Ray. I read an answer you graciously gave to another user about the constant popping up of "Windows Installer - Preparing to install". I cannot...
0
geolemon
by: geolemon | last post by:
I developed an Access database on my laptop, which has Access 2003. The workstations in our office have Office 2007 installations, which did not include Access (Student and Teacher edition...
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: 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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
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,...

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.