program adds 2 identical records to table

Reply

Join Date: Aug 2006
Posts: 29
Reputation: stan yost is an unknown quantity at this point 
Solved Threads: 0
stan yost stan yost is offline Offline
Light Poster

program adds 2 identical records to table

 
0
  #1
Oct 12th, 2006
My vb 5.0 program is adding 2 identical records to a table each time I run it. Does anyone know what would cause this?
Thanks
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: program adds 2 identical records to table

 
0
  #2
Oct 12th, 2006
You are somehow runing the function that adds the record twice. Could be that you have a couple ways to execute the function and because of the way your events are linked you run through the code twice.

I see this happen when you link an update via OnChange event on a TextBox for example, then when you change the box it executes the routine,which in turn updates the TextBox with a new value -- which kicks off the OnChange again.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 29
Reputation: stan yost is an unknown quantity at this point 
Solved Threads: 0
stan yost stan yost is offline Offline
Light Poster

Re: program adds 2 identical records to table

 
0
  #3
Oct 12th, 2006
How can I tell when vb executes something that I don't know about, such as this onchange?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC