home bbs files messages ]

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

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

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

   Message 9,588 of 10,840   
   Joe-Paul to All   
   VB 6.0 Don't Add a New REcord   
   25 Jun 05 00:21:57   
   
   From: HarvestWind@comcast.net   
      
   Hi:   
      
   I need to try this a different way.   
      
   I have a datagrid in VB 6.0 and the user can add new records.  I want to   
   validate the record before it is saved and, if a particular cell is not   
   completed, I don't want the program to save the record when the user moves   
   off of it.   
      
   If I put code in the Before_Update event checking for the required data and   
   the data isn't there, I can do "Cancel = true"...then I get a message that   
   says "Action is Cancelled"... It doesn't allow me to put in my own message.   
   I can use vbdataerrcontinue, and the error message is not shown, but the   
   record is saved.   
      
   How do I keep the record from saving with my own message and not a "program"   
   error message?   
      
   Thanks for any assistance.   
      
   JP   
      
   --- 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