Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Subscript Reference while declaring function 1

Status
Not open for further replies.

peteschulte

IS-IT--Management
Nov 21, 2008
41
US
Hello,
This is the first Function I have declared in years, though I used FP 2.x back in the 90's.
Help anyone?
I'm in VFP 9 the error message comes at the DO command and says "Invalid Subscript Reference."
See the URL to view the code.
Thanks very much!
Peteschulte

 
Hi Peterschulte,

This is a simple syntax error. Instead of this:

Code:
DO send_email_eod(emailtext)

you need this:

Code:
DO send_email_eod WITH emailtext

Alternatively, you can do this:

Code:
send_email_eod(emailtext)

The second form would be appropriate if you were picking up a returned value, but that's not the case here.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top