Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

on what event does this need to be on to work?

Status
Not open for further replies.

Spyridon

Technical User
Jun 27, 2003
45
0
0
US
I have a form with a text field (text1) that someone types in and an option group that the user has to select. Depending on what option a user selects, I have code that adds to it. Let's say the option value is 1, then code adds 100, and then that value is written to another textbox (text2). Right now I have the code written with the on click event of a command button, but I really don't like this. After text2 gets it's value, I press the next record button on the bottom of the form and everything is dandy.

Where can I place the code that increments the option so that after a user chooses an option text2 is immediately populated with the correct value? It would save the users just one more click....

The reason I have it set up this way is because I have tried using a SQL Insert statement, and also adding a new recordset in the code, but what happens is that I get 2 records, one with text1's value, and then the next one with text2's value. I probably did something wrong in setting those up, so if anyone has any ideas I would appreciate it!

Michael
 
Put the code in the After Update event of Text1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top