On Enter event

G

Guest

Hi, I need to add a constant to a user defined number entered in a textbox
using an on enter event. Then I need to dump that sum into a table to which
the form is attached. I guess my real question is how do I work with the
entered value from the text box in a private sub? And how do I store the new
reult in the table?

Thanks in advance for your time and help.

Rich
 
T

tina

well, i doubt you want to run the code from the Enter event, which fires
when the cursor "enters" the control (not when a user "enters" data). if you
want the user to type a number into the textbox, and then run code to take
that number, add another value, and write the result to a table, use the
textbox control's AfterUpdate event procedure, as

Me!FieldName = Me!TextboxName + 100

replace FieldName and TextboxName with the correct names in your database,
of course. and replace 100 with whatever number you want.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top