Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: subhankar pandey
  Where is subhankar pandey?
 Kolkata/Delhi
 India
 subhankar pandey
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: How to prevent to modify record
Thread ID: 155246 Message ID: 155355 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Monday, December 31, 2007 6:20:37 AM         
   


Thanks Ken,

Very good logic. I was thinking the code to apply in "Print Preview toolbar" but not thinking that yr valuable code can be apply in my Prg.

However, Thanks again, here is my rating to you.

May this New Year bring thousand of Joyous, Charms, Goodwill, Health, Wealth and Prosperity in your life.
Happy New Year'08 to you and your family.

Best Regards
Subhankar

> > Yes Ken & Mike,
> >
> > As per yr advise I hv done the following code in my prg i.e.
> > 	SELECT partyname.P_name, partyname.address1, partyname.address2, debitnote.*, calculation1.*, ; 
> > 	calculation2.*  ;
> >     FROM partyname  ;
> >     INNER JOIN debitnote ON partyname.record_id = debitnote.record_id ;     
> >     LEFT OUTER JOIN Calculation1 ON Calculation1.Record_ID = DebitNote.Record_ID ;
> >     LEFT OUTER JOIN Calculation2 ON Calculation2.Record_ID = DebitNote.Record_ID ;
> >     Where thisform.txtDebitnote.value = debitnote.Denitnoten ;
> >     ORDER BY partyname.p_name ;
> >     INTO CURSOR MyReportCursor
> >     Report Form lcldebit1 TO PRINTER PROMPT PREVIEW
> > 

> > Now in report preview screen, there is system generated menu bar where print icon is avl,upon click print icon user can print the report lcldebit1.frx.
> > Now how do I control the below code there :-
> > select partyname
> > IF partyname.lPrinted
> > =messagebox("Record has been printed so do not modify")
> > RETURN .F. 
> > ELSE
> > =messagebox("Record has not been printed so go ahead.")
> > RETURN .T. 
> > ENDIF
> > 

> >
> > FYi, I'm not using FRX2ANY nither any other pack too.
> >
> > Regards
> > subhankar
> >
> >
>
>
> Begin by adding PartyName.RecordID to your query. This will give you the RecordID you need for the update process. After you have printed your report, use a MESSAGEBOX() to determine if the report has printed correctly and then you can set your lPrinted to .t.
>
>
> IF MESSAGEBOX("Did the report print correctly?", 20, "Please Verify") = 6
>    SELECT MyReportCursor
>    SCAN
>       IF SEEK(MyReportCursor.RecordID,[PartyName],[MyPrimaryKeyTag]) AND llAnyOtherConditionsYouWant
>          REPLACE PartyName.lPrinted WITH .t. IN [PartyName]
>       ENDIF
>    ENDSCAN
> ENDIF
> 

>
> Ken
> You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

How to prevent to modify record Posted by subhankar pandey @ 12/28/2007 1:20:53 PM
RE: How to prevent to modify record Posted by Mike Gagnon @ 12/28/2007 1:59:13 PM
RE: How to prevent to modify record Posted by Ken Murphy @ 12/28/2007 2:00:27 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/29/2007 8:43:59 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/29/2007 12:45:49 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:22:15 AM
RE: How to prevent to modify record Posted by Ken Murphy @ 12/29/2007 1:23:50 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:20:37 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/28/2007 10:55:48 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/29/2007 8:57:01 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/29/2007 1:10:12 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:24:55 AM