Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Michael Gill
  Where is Michael Gill?
 Illinois - United States
 Michael Gill
 To: Paul Michael
  Where is Paul Michael?
 Connecticut - United States
 Paul Michael
Subject: RE: Variable Not found - Please Assist
Thread ID: 22386 Message ID: 22390 # Views: 0 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Wednesday, April 16, 2003 11:12:45 PM         

> Good afternoon Foxpro Guru's:
> This is a modified email program of mine I posted yesterday.
> Thank you,
> PM
> Error message - Variable 'Recvremail' is not found
> VFP Debugger (crashing here): lcTarget = Recvremail
> Click ignore, all my data will get to my Lotus Notes email. In the email form TO: False (due to my error)
> So we know where the problem lies.
> My target, Recvremail is the field that contains the email address in my Mails.dbf. For everr record/email I send I need the address to appear in the "TO" location hence, False appears. It just may be simple as declaring my variable?? any sugestions?
> Code:
> *****************************************************************
> &&Program works with Lotus Notes.
> Create Cursor testmail (signed c(1), Trackno i, Rdate d)
> For ix=1 To 100
> Insert Into testmail Values ;
> (Chr(Asc('a')-1+Ceiling(Rand()*26)), ix, Date()-ix)
> Endfor
> Browse For signed = 'n' && Would email these
> Local lcTarget, lcCurdir, oForm
> lcCurdir = Sys(5)+Curdir()
> Select testmail
> oForm = Createobject("form")
> oForm.AddObject("oSession","olecontrol","MSMAPI.mapiSession")
> oForm.AddObject("oMessage","olecontrol","MSMAPI.mapiMessages")
> oForm.oSession.signOn
> With oForm.oMessage
> .sessionid = oForm.oSession.sessionid
> Scan For signed = 'n' && Would email these
> lcTarget = recvremail &&The email field in the mails.dbf


It's obvious that the variable "rcvremail" doesn't exist for this section of code. Since we don't know how you call this code or where that code is stored (as a form method or a .prg procedure) we can only guess as to what will help you. You may have to declare that variable PUBLIC before you store a value to it. Or you may have to pass that value as a parameter.

Good luck,

www.foxite.com - The Home of the Visual FoxPro Experts


Variable Not found - Please Assist Posted by Paul Michael @ 4/16/2003 9:00:06 PM
RE: Variable Not found - Please Assist Posted by Michael Gill @ 4/16/2003 11:12:45 PM