If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
TextBox
Hi!
I created a form and I'm doing a validation of the values entered. It works great the first time arround, but when I click on reset it skips the first two TextBox. The first box is called strFirstName The second box is called strLastName This is what I'm using to check: If IsNull(Me.strFirstName) Then MsgBox "Please enter first name" Me.strFirstName.SetFocus End End If Like I said at the beginning it works fine when I reopen the form and after no. My reset is: Me.strFirstName.Value = "" What am I doing wrong?? Thanks to all for your help CHEERS REN |
#2
|
|||
|
|||
TextBox
What do you mean, "my reset is..." Why is there a reset? Why would you
want to clear out the field? Why don't you simply use a validation rule to say that the field can't be =""? Not sure i understand this "reset" funtionality. Rick B "Ren" wrote in message ... Hi! I created a form and I'm doing a validation of the values entered. It works great the first time arround, but when I click on reset it skips the first two TextBox. The first box is called strFirstName The second box is called strLastName This is what I'm using to check: If IsNull(Me.strFirstName) Then MsgBox "Please enter first name" Me.strFirstName.SetFocus End End If Like I said at the beginning it works fine when I reopen the form and after no. My reset is: Me.strFirstName.Value = "" What am I doing wrong?? Thanks to all for your help CHEERS REN |
#3
|
|||
|
|||
TextBox
Thanks for your help Rick
Before the user can go to the next part of the form, they must complete the first part. So I have a Next button that they click and at the same time it validates the first part of the form. FirstName, LastName etc. The reason for the Reset button is if the user wants to start over, so it clears all the fields of the first part of the form. Thanks again. Cheers Ren "Rick B" wrote: What do you mean, "my reset is..." Why is there a reset? Why would you want to clear out the field? Why don't you simply use a validation rule to say that the field can't be =""? Not sure i understand this "reset" funtionality. Rick B "Ren" wrote in message ... Hi! I created a form and I'm doing a validation of the values entered. It works great the first time arround, but when I click on reset it skips the first two TextBox. The first box is called strFirstName The second box is called strLastName This is what I'm using to check: If IsNull(Me.strFirstName) Then MsgBox "Please enter first name" Me.strFirstName.SetFocus End End If Like I said at the beginning it works fine when I reopen the form and after no. My reset is: Me.strFirstName.Value = "" What am I doing wrong?? Thanks to all for your help CHEERS REN |
#4
|
|||
|
|||
TextBox
I'm guessing then that this is an unbound form. I think the validation
rules would still work. Your reset button should simply have code to reset the two fields and then move the focus to the appropriate field. I'm guessing that the data in the fields is used for something before the reset button ispressed? Let us know if have further questions. Rick B "Ren" wrote in message ... Thanks for your help Rick Before the user can go to the next part of the form, they must complete the first part. So I have a Next button that they click and at the same time it validates the first part of the form. FirstName, LastName etc. The reason for the Reset button is if the user wants to start over, so it clears all the fields of the first part of the form. Thanks again. Cheers Ren "Rick B" wrote: What do you mean, "my reset is..." Why is there a reset? Why would you want to clear out the field? Why don't you simply use a validation rule to say that the field can't be =""? Not sure i understand this "reset" funtionality. Rick B "Ren" wrote in message ... Hi! I created a form and I'm doing a validation of the values entered. It works great the first time arround, but when I click on reset it skips the first two TextBox. The first box is called strFirstName The second box is called strLastName This is what I'm using to check: If IsNull(Me.strFirstName) Then MsgBox "Please enter first name" Me.strFirstName.SetFocus End End If Like I said at the beginning it works fine when I reopen the form and after no. My reset is: Me.strFirstName.Value = "" What am I doing wrong?? Thanks to all for your help CHEERS REN |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
textbox formatting problem | jeffrey c | Powerpoint | 4 | August 21st, 2004 10:09 AM |
How can I insert text in a textbox automatically? | Lee | Using Forms | 4 | May 25th, 2004 09:33 PM |
Linking TextBox to a cell -- Urgent | Wolf | Worksheet Functions | 3 | October 5th, 2003 03:22 AM |