From: usenet@soleSPAMLESSassociates.com   
      
   On Fri, 9 Jan 2009 14:44:52 -0500, "Jim Giner"   
    wrote:   
      
   >Jim - I'm guessing that tc2 is pointing to a one record table - without a   
   >key. It's the way he increments his form's record keys.   
   >"Jim Hargan" wrote in message   
   >news:15clbx9nh2zu5.7s6itx22fmcd.dlg@40tude.net...   
   >> Inline.   
   >>   
      
   Hi to All,   
      
   Yes, tc2 does point to a table with just the one record. It   
   simply holds the counter that I use to generate the key.   
      
   That said, I removed the edit() that I finally saw.   
      
   (It was, by the way, apparently inserted by alien beings   
   about whom I know nothing.)   
      
   I also added the edit test, as suggested by Tony, so that I   
   now have:   
      
      
   method action(var eventInfo ActionEvent)   
   var   
    tc2 tCursor   
   endVar   
      
    if not isEdit() then   
    edit()   
    else   
    endIf   
      
    if eventInfo.id()=dataInsertRecord then   
    DoDefault   
      
    if not tc2.open(":MONEY:EntryNum.DB") then   
    errorShow()   
    endIf   
      
    EntryNumber = tc2.entryNum   
      
    tc2.edit()   
    tc2.entryNum = EntryNumber + 1   
    entry = tc2.entryNum   
    tc2.endEdit()   
    tc2.close()   
    endIf   
   endMethod   
      
      
   and with the limited testing I have done, it seems to work   
   properly.   
      
   I am deeply appreciative of the help you have all   
   provided...   
      
   Many thanks,   
   --   
   Kenneth   
      
   If you email... Please remove the "SPAMLESS."   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|