954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

program adds 2 identical records to table

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

stan yost
Light Poster
29 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

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.

WaltP
Posting Sage w/ dash of thyme
Moderator
10,492 posts since May 2006
Reputation Points: 3,348
Solved Threads: 943
 

How can I tell when vb executes something that I don't know about, such as this onchange?

stan yost
Light Poster
29 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You