Invalid procedure call

diversoln

Registered User.
Local time
Today, 21:59
Joined
Oct 8, 2001
Messages
119
I have a text format operation that works fine on my home PC but not on the PC at the install site. I thought maybe it was a library issue but all the functions are in the library.

I changed the following which works:

SHORTPAT: UCase(Left([PATIENT],10))

to

SHORTPAT: UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10))


which results in the Invalid procedure call error

Since the InStr seems to be in the library of functions I'm stumped ...

Thanks for any help you can offer.
 
You have another unrelated library missing on the work computer. In any module, go up to Tools ... References ... to see the MISSING item. Do a search in these forums for Missing Reference.
 
I dont see references under the tools menu .....
 
In any module ...

You must be in a code module. Select Modules from your object list and then New. Then go to Tools ... References.
 
Try this:

SHORTPAT: IIf(InStr([PATIENT],',')>0,UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10)),UCase(Left([PATIENT],10)))

In Acc97, if you put, "SHORTPAT: UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10))" into the Field row of the query design grid and [PATIENT] doesn't have a "," (comma) in that field, the field will display "#Error".

If (in Acc97) you try to use something like:

Me.txtPatient = UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10))

in a code module, you'll get the "Invalid procedure call or argument" error if [PATIENT] does not have a "," somewhere in the field because the Left function can't take -1 characters.

hth,
 

Users who are viewing this thread

Back
Top Bottom