command button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to perform simple mathematical addition using a command button,but i
don't know how to set it....
 
I'm not sure as to why? You can simply create an unbound textbox and then
simply use and afterupdate event from your source textboxes to trigger it to
requery.

If you absolutely want to use a command button, it is quite simple.
Assumming you have 2 textboxes, I will name them for demonstration purposes
txtNumber1 and txtNumber2, and you wish to get the value of their addition
into another texbox named txtSum. The basic code behind a click event for a
command button would be

Me.txtSum = Me.txtNumber1 + Me.txtNumber2

The issue being that you will always need to click the button to get the
result. Using afterupdate events you can completly automate the process so
your users (or yourself) need not do anything. Every click less is time you
can use doing something more important.
 

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

Back
Top