Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Type Conversion Failure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john in fl - 26 Feb 2006 03:22 GMT
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 Failure".

The field in question is set up as a Long Integer in the target table.

When creating values, the Append Query performs a "group by" on this
field, and, although it leaves the data format blank, only offers
date-related options for formatting. It will not let me format the
field as a long integer in the query.

The difference between the Long Integer format in the target table and
the blank/date format generated by the Append Query appear to be
causing the error.

I'm stumped as to how to correct this...thanks in advance for any
assisstance.

John
Allen Browne - 26 Feb 2006 04:12 GMT
John, can you typecast the field in your query?

For example, you have this in the Field row:
   [Field1]
try replacing it with:
   CLng(Nz([Field1],0))

The Nz() is also needed since CLng() can't handle nulls.

More info on typecasting:
   Calculated fields misinterpreted
at:
   http://allenbrowne.com/ser-45.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hello Everyone,
> I have an Append Query that worked fine in Access97 but now fails to
[quoted text clipped - 16 lines]
>
> John
john in fl - 26 Feb 2006 19:55 GMT
Allen,
Thanks...I got it to work !

John

> John, can you typecast the field in your query?
>
[quoted text clipped - 35 lines]
> >
> > John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.