By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

code to move to next textbox when a command button is clicked

P: 10
I have created a form using the wizard, to display the contents of the table.
I need to update the table by entering the data through the form.
When i click the update button of my form, it ignores the last text box value.
If i press tab and move to the next text box and click the update button, the last textbox value is taken into account.

When i click the update button, the cursor should automatically be moved to the next textbox. How can this be coded?
Can anyone suggest a solution for this?
May 8 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 218
Hi

Under normal circumstances you would use something like:
Expand|Select|Wrap|Line Numbers
  1. Me.NextTextBox.SetFocus
BUT what code do you have behind your "Update" button?

Steve
May 8 '07 #2

P: 10
Hi

Under normal circumstances you would use something like:
Expand|Select|Wrap|Line Numbers
  1. Me.NextTextBox.SetFocus
BUT what code do you have behind your "Update" button?

Steve
Am getting the values from the textbox and performing some operations on tables.
since my form is created using a wizard it has only one textbox which dynamically retrieves data from the table and the textbox number increases according to the number of rows in my table.
So all the texboxes have a single name for ex. txt_total
So i need to know how can i refer to the next textbox
May 9 '07 #3

Expert 100+
P: 218
Are you talking about a scrolling list of records?
May 9 '07 #4

NeoPa
Expert Mod 15k+
P: 31,342
...
BUT what code do you have behind your "Update" button?
...
You will need to answer the questions if you want people to help you.
May 11 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.