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

Update currency field

Hello, can someome please tell me why this update statement is finding 0
fields to replcae whrn I know I have 10 fields?

strSQLUpdate = "UPDATE [" & tblName & "] SET [" & tblName & "].[" & colName &
"]= True"
strSQLUpdate = strSQLUpdate & " WHERE [" & tblName & "].[" & whereField & "]
= " & whereCriteria
DoCmd.RunSQL strSQLUpdate

I am not getting an error, only the message that tells me how many fields
will be updated - in this case I always get 0

--
Message posted via http://www.accessmonster.com
Jun 27 '06 #1
9 3990
Could it be because "True" is not a valid value for a Currency Field?

Larry Linson
Microsoft Access MVP

"DMUM via AccessMonster.com" <u16673@uwe> wrote in message
news:626b93a20ff3d@uwe...
Hello, can someome please tell me why this update statement is finding 0
fields to replcae whrn I know I have 10 fields?

strSQLUpdate = "UPDATE [" & tblName & "] SET [" & tblName & "].[" &
colName &
"]= True"
strSQLUpdate = strSQLUpdate & " WHERE [" & tblName & "].[" & whereField &
"]
= " & whereCriteria
DoCmd.RunSQL strSQLUpdate

I am not getting an error, only the message that tells me how many fields
will be updated - in this case I always get 0

--
Message posted via http://www.accessmonster.com

Jun 27 '06 #2
Hi Larry

I actually found the problem, but I don't know what to do to address it...

The code works unless the number in the field is actually a rounded figure. i.
e if the number is 10.00 - it works. if the number is 10.045 rounded to 10.
00 it does not. I know it wants to find the "whole number" but you can't
tell that the number is rounded by formating unless you click on it. Any
suggestions?
Larry Linson wrote:
Could it be because "True" is not a valid value for a Currency Field?

Larry Linson
Microsoft Access MVP
Hello, can someome please tell me why this update statement is finding 0
fields to replcae whrn I know I have 10 fields?

[quoted text clipped - 9 lines]
I am not getting an error, only the message that tells me how many fields
will be updated - in this case I always get 0


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200606/1
Jun 27 '06 #3
"DMUM via AccessMonster.com" <u16673@uwe> wrote in
news:626bdfa89b35a@uwe:
Hi Larry

I actually found the problem, but I don't know what to do to
address it...

The code works unless the number in the field is actually a
rounded figure. i. e if the number is 10.00 - it works. if
the number is 10.045 rounded to 10. 00 it does not. I know it
wants to find the "whole number" but you can't tell that the
number is rounded by formating unless you click on it. Any
suggestions?


Compare rounded numbers.
e.g. Where round(CurrencyField,2) = 1.23
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 27 '06 #4
Thank you Thank you

Just what I needed!

Bob Quintal wrote:
Hi Larry

[quoted text clipped - 7 lines]
number is rounded by formating unless you click on it. Any
suggestions?


Compare rounded numbers.
e.g. Where round(CurrencyField,2) = 1.23


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200606/1
Jun 28 '06 #5
Glad you got it working. What is the result of updating a Currency Field to
the value of True?

Larry Linson
Microsoft Access MVP

"DMUM via AccessMonster.com" <u16673@uwe> wrote in message
news:626c0f15a1bca@uwe...
Thank you Thank you

Just what I needed!

Bob Quintal wrote:
Hi Larry

[quoted text clipped - 7 lines]
number is rounded by formating unless you click on it. Any
suggestions?


Compare rounded numbers.
e.g. Where round(CurrencyField,2) = 1.23


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200606/1

Jun 28 '06 #6
"Larry Linson" <bo*****@localhost.not> wrote in
news:zSjog.4630$uo.628@trnddc07:
Glad you got it working. What is the result of updating a
Currency Field to the value of True?

Larry Linson
Microsoft Access MVP
The account contains $ -1.00, thanks to Access typecasting.

Q

"DMUM via AccessMonster.com" <u16673@uwe> wrote in message
news:626c0f15a1bca@uwe...
Thank you Thank you

Just what I needed!

Bob Quintal wrote:
Hi Larry

[quoted text clipped - 7 lines]
number is rounded by formating unless you click on it. Any
suggestions?

Compare rounded numbers.
e.g. Where round(CurrencyField,2) = 1.23


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For.../databases-ms- acce ss/200606/1



--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 28 '06 #7
"Bob Quintal" <rq******@sPAmpatico.ca> wrote
The account contains $ -1.00, thanks to Access typecasting.


Do you think that could really have been the point of that update query?

Larry
Jun 28 '06 #8
"Larry Linson" <bo*****@localhost.not> wrote in
news:RHmog.4658$uo.2299@trnddc07:
"Bob Quintal" <rq******@sPAmpatico.ca> wrote
The account contains $ -1.00, thanks to Access typecasting.


Do you think that could really have been the point of that
update query?

Larry

I doubt it very much, however I'm sure it was disguised in order to
protect information. :-)

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 28 '06 #9
"Bob Quintal" wrote
The account contains $ -1.00, thanks
to Access typecasting.


Do you think that could really have
been the point of that update query?

I doubt it very much, however I'm sure
it was disguised in order to
protect information. :-)


You are likely correct. However, I must admit that sometimes it strikes me
that anyone who can't go to the trouble of at least creating logical,
rational "disguised information" may not really be seriously in need of a
logical, rational answer. :-)

Larry
Jun 29 '06 #10

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

Similar topics

1
by: Brandon McCombs | last post by:
hello, I have an app that pops up a custom dialog box and one of the fields for user input is an account balance field. The data gets put into an Object and eventually into an instance of...
2
by: Dalan | last post by:
This should not be an issue, but it is. I'm sure that someone knows what little piece of code is needed too persuade Access 97 to include a currency format for labels (Avery, mailing type). Have...
3
by: Melissa | last post by:
I have several fields in my database specified as Currency data type. Is there a way globally to set these fields not to display the dollar sign? Thanks! Melissa
3
by: news.shaw.net | last post by:
I have a subform that contains a currency field. If I tab my way to the field, everything works as desired, a number can be entered, and when I leave the field it is rendered as a currency...
2
by: Joseph Markovich | last post by:
I'm having some trouble with VB in Access 2000. I have a form that the user enters in just one number (in this case, it's a base salary) and then the program is going to do a bunch of math (which...
1
by: Tom Keane | last post by:
Hi, I need some helpings again! I have a query from one of my tables that gets a total amount of money and gets a percentage from it ie, the field I create in the query is invGSTAmount from a...
3
by: Dave Stone | last post by:
This question appeared years ago in the context of Acc2K and SQL Server 7, but no replies were posted. HOWEVER!! It still seems to be a problem with Acc XP and SQL Server 2000. Surely someone has a...
9
by: Geraldine Hobley | last post by:
Hello I'm getting the above mentioned error in my applicatio I have a datagrid bound to a datasource like s MyDatagrid.DataSource = Mydataset.Tables(Order) - this all works fine However I...
8
by: Stephen Plotnick | last post by:
I have three forms and update one table in an Access DB with sucess in one form. In the other two forms I'm trying to do an update to a different table in the Access DB. The error I'm getting...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.