home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,432 of 9,834   
   Liz McGuire to Kenneth   
   Re: Unlocking problem...   
   09 Apr 07 10:12:57   
   
   From: liz@paradoxcommunity.com   
      
   What if you used dmPut (not sure it won't trigger the unlock code) or a   
   tcursor (certain it won't trigger the unlock code) to assign the viewed   
   field?  That would avoid having to tweak the mod date code - which I   
   think would be harder.   
      
   Liz   
      
      
   Kenneth wrote:   
   >   
   > Hi again,   
   >   
   > Well, I am having a problem with this after all...   
   >   
   > I have a field called "ModDate" that shows today() if there   
   > is any modification to any field on the form.   
   >   
   > I also have a field called "Viewed" that shows today() if a   
   > record is viewed, whether or not anything is modified.   
   >   
   > Of course, I would not want ModDate to change if there is no   
   > modification to the record, but now, because of the change   
   > to the "Viewed" field, ModDate also changes.   
   >   
   > I assume that I can modify the "ModDate" code so that it   
   > "ignores" changes to the "Viewed" field, but I don't know   
   > how to do that.   
   >   
   > Here is the ModDate code from the action event of the form:   
   >   
   > method action(var eventInfo ActionEvent)   
   >   
   > var   
   > endVar   
   > 	if eventInfo.isPreFilter() then   
   > 		;// This code executes for each object on the form:   
   >  if isEdit() then   
   > 	if eventInfo.id() = DataRefresh then   
   > 	  eventInfo.setErrorCode(UserError)   
   > 	endIf   
   >  endIf   
   > 	else   
   > 		;//This code executes only for the form:   
   >   
   > if  (eventInfo.id() = DataPostRecord   
   >   and  active.RecordStatus("New"))   
   > or  (eventInfo.id() = DataUnlockRecord   
   >   and (active.RecordStatus("Modified")   
   > or   active.RecordStatus("Locked"))) then	   
   > 	ModDate.value = today()   
   > endIf   
   > endIf   
   > endMethod   
   >   
   > Can you suggest the modification I need?   
   >   
   > Sincere thanks,   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca