473,326 Members | 2,136 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,326 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 6955
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
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.