Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: madhan mo
  
 
 
 madhan mo
 Tags
Subject: RE: prg function calling from form
Thread ID: 210985 Message ID: 210993 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Other
Date: Thursday, January 08, 2009 6:59:27 PM         
   


> >
> >
> > You can't call a function like the way you call it. Just call its name:
> >
> > ...
> > IF !EMPTY(ThisForm.txtRecDate.Value) AND !EMPTY(ThisForm.txtVendorinvoicenumber.Value) AND thisform.checkduedate()
> >    PostPtAccrual(v_apinvoice1.Apinvoiceid,v_apinvoice1.invRecDate)
> >    ...
> > 

> > And I hope you have SET PROCEDURE TO CAP.PRG line somewhere in your main PRG.
> > -----------------
> > Borislav Borissov
> >
> > Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
> > The only thing normal about database guys is their tables.
>
> Thanks for the reply, Borislav.
>
> In other command button,some programmers used
>
> thisform.oAP.GetHighestInvoiceLine(v_APInvoice1.APInvoiceId) + 1
>
> that line works fine. GetHighestInvoiceline is anothe function which is available in cap.prg.
>
> and I searched main.prg for
> set procedure to cap.prg
>
> that is not available in main.prg.


And what is oAP?
You have a property but if you set it to NULL you can't call anything from it.
Maybe somewhere in the form you use thisform.oAP = CREATOBJECT(some object) (or NEWOBJECT(some object)) and that object have Method named GetHighestInvoiceLine().




-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.



COMPLETE THREAD
prg function calling from form Posted by madhan mo @ 1/8/2009 6:32:07 PM
RE: prg function calling from form Posted by Borislav Borissov @ 1/8/2009 6:34:40 PM
RE: prg function calling from form Posted by madhan mo @ 1/8/2009 6:42:25 PM
RE: prg function calling from form Posted by Borislav Borissov @ 1/8/2009 6:59:27 PM
RE: prg function calling from form Posted by Glenn Villar @ 1/9/2009 5:55:51 AM