hi,
i am trying to round off the value of a text field and then append it to a decimal field, but it's giving type conversion failure, below is the query plz help :- -
IIf(Len(CDbl([a.text]))<8 And Mid(CDbl([a.text]),8,1)<>5 Or Mid(CDbl([a.text]),8,1)<1,(Round(CDbl([a.text]),3)),CDbl(Round([a.text],3)+0.001))
2 2108
hi,
i am trying to round off the value of a text field and then append it to a decimal field, but it's giving type conversion failure, below is the query plz help :- -
IIf(Len(CDbl([a.text]))<8 And Mid(CDbl([a.text]),8,1)<>5 Or Mid(CDbl([a.text]),8,1)<1,(Round(CDbl([a.text]),3)),CDbl(Round([a.text],3)+0.001))
Hi Durgapur,
Len(CDbl([a.text] : Len() function will be used only with string/varchar datatypes so don't convert text to decimal before checking the length [Same for other functions].
Try this -
IIf(Len([a.text])<8 And Mid([a.text],8,1)<>5 Or Mid([a.text],8,1)<1,(Round(CDbl([a.text]),3)),Round(CDbl([a.text]),3)+0.001))
Hope this helps
pbmods 5,821
Recognized Expert Expert
Please use CODE tags when posting source code:
[CODE]
Source code goes here.
[/CODE]
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Tongu? Yumruk |
last post by:
I have a little proposal about type checking in python. I'll be glad
if you read and comment on it. Sorry for my bad english (I'm not a
native English speaker)
A Little Stricter Typing in Python...
|
by: s_gregory |
last post by:
The mdb is considerable size 70 +- mb. A complex union query was
working well, but when an additional union select... was added into
the query, selecting identical fields from a different source,...
|
by: David Barger |
last post by:
Greetings,
It appears that an Append Query I run in Access XP is randomly failing
to append a field.
I have payroll data being entered into a payroll database. This data
is exported daily to...
|
by: Arno R |
last post by:
Hi all,
I have a database that I need to use in different versions of Access.
This is A97 in most places and A2k in a few other locations.
(I develop in A97 and convert the db to A2k for these...
|
by: john in fl |
last post by:
Hello Everyone,
I have an Append Query that worked fine in Access97 but now fails to
work in Access 2000. The error that occurs is that it puts null values
in a field due to a "Type Conversion...
| |
by: Reedsp |
last post by:
OS: MS XP
Access version: 2003 SP2
I am trying to use an update query to replace quote marks with nothing. In essence, I'm removing quote marks. I get a error message when a field is empty or...
|
by: isben22 |
last post by:
I am a beginning developer using ACCESS 03 and Share Point Portal 2003.
I have a list of events with start and stop dates in SharePoint that I want to pass to and Access Data Base.
Ultimatly I...
|
by: Smithers |
last post by:
Are there any important differences between the following two ways to
convert to a type?... where 'important differences' means something more
profound than a simple syntax preference of the...
|
by: billa856 |
last post by:
Hi,
I am trying to insert Null value in column(ShipDate) in my table.That column(ShipDate)'s type id date/time and format is short date.
I am using "" to insert Null in that column(ShipDate)...
|
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,...
|
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,...
| |
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: 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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |