A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

TextBox



 
 
Thread Tools Display Modes
  #1  
Old June 29th, 2004, 06:20 PM
Ren
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 06:27 PM
Rick B
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 06:50 PM
Ren
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 08:10 PM
Rick B
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.