Re: Type Conversion Failure



Allen,
Thanks...I got it to work !

John



Allen Browne wrote:
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

--
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.

"john in fl" <john.caserta@xxxxxxxxxxxxx> wrote in message
news:1140924164.222851.67910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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

.



Relevant Pages

  • Type Conversion Failure
    ... I have an Append Query that worked fine in Access97 but now fails to ... The error that occurs is that it puts null values ... The field in question is set up as a Long Integer in the target table. ... It will not let me format the ...
    (comp.databases.ms-access)
  • Re: Using VBA need to add a text box to a form
    ... Since you already have a reference to txt, you can assign the format ... Allen Browne - Microsoft MVP. ... Perth, Western Australia. ... to do is a loop code for the conditional format set up ...
    (microsoft.public.access.formscoding)
  • Re: Updating form based on 2 fields.
    ... Allen Browne - Microsoft MVP. ... Perth, Western Australia. ... Tips for Access users - http://allenbrowne.com/tips.html ... dates are text with the short date format. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Duplicate the record in form and subform and Subbforms within
    ... and then uses the key value in an Append query string to ... Essentially you have a loop within a loop, ... If you have further levels of subform, you have more 'middle' layers here. ... Allen Browne - Microsoft MVP. ...
    (microsoft.public.access.formscoding)
  • Re: Working days calc error
    ... Allen Browne - Microsoft MVP. ... The Format is not relevant. ... If the field you are passing is a Date/Time field in a table, ... you need to declare it (Parameters on Query menu, ...
    (microsoft.public.access.queries)