Invalid Argument Error

S

Sam Nelson

In Access 2000 - I am trying to run a select-query that
has a field that references a text field from a form that
is open. The field is as follows -

PaymentsDue: IIf(IsNull([Forms]![frm ContinueImport]!
[txtPaymentsDue]),"",[Forms]![frm ContinueImport]!
[txtPaymentsDue])

Most of the time, the query runs fine but occassionally if
the text string in the txtPaymentsDue text box is too long
(over 127 characters), the query will not run and instead
return an error stating "invalid Argument".

Any ideas on what causes this?
 
J

John Vinson

In Access 2000 - I am trying to run a select-query that
has a field that references a text field from a form that
is open. The field is as follows -

PaymentsDue: IIf(IsNull([Forms]![frm ContinueImport]!
[txtPaymentsDue]),"",[Forms]![frm ContinueImport]!
[txtPaymentsDue])

Most of the time, the query runs fine but occassionally if
the text string in the txtPaymentsDue text box is too long
(over 127 characters), the query will not run and instead
return an error stating "invalid Argument".

I'm not sure - but you might try

PaymentsDue: NZ([Forms]![frm ContinueImport]![txtPaymentsDue], "")

or, since a Null will display as a blank, just the form reference
itself.
 
S

Sam

No, the NZ function gives the same result. I've also
tried just the FORM REFERENCE itself as noted below, but
that also gives the same result.

-----Original Message-----
In Access 2000 - I am trying to run a select-query that
has a field that references a text field from a form that
is open. The field is as follows -

PaymentsDue: IIf(IsNull([Forms]![frm ContinueImport]!
[txtPaymentsDue]),"",[Forms]![frm ContinueImport]!
[txtPaymentsDue])

Most of the time, the query runs fine but occassionally if
the text string in the txtPaymentsDue text box is too long
(over 127 characters), the query will not run and instead
return an error stating "invalid Argument".

I'm not sure - but you might try

PaymentsDue: NZ([Forms]![frm ContinueImport]! [txtPaymentsDue], "")

or, since a Null will display as a blank, just the form reference
itself.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top