Force user to enter data twice in a text box before insert

philtr

Registered User.
Local time
Today, 11:06
Joined
Mar 19, 2008
Messages
11
I've got an attribute called GPS which is really important the user enters the data twice for verification before it can be inserted into the table. Also if the data doesn't match up an error message should be displayed and the user must then try again. Any ideas? thanks in advance. :)
 
Simple Software Solutions

Why not add an additional text box on the form to force them to enter it again. Similar to when you are requested to re-enter new passwords to confirm accuary.

CodeMaster::cool:
 
Thanks, i've got two text boxes now, with a validation rule. Is there any way I can hide the second text box until the user has entered data into the first and then hide the second text box again once the data has been validated?
 
Simple Software Solutions

Set the second text box visible property to False then on the keypress of the first text box check for the length of the contents and if over zero make the second text box visible.

David
 
What code would I need for the key press? Really new to VB so any help is appreciated :)
 
Simple Software Solutions

Ok

On the OnChange event property of Txt1 type in the following:

Code:
Dim sText As String
sText = Trim(Me.Txt1)

    If Not sText = "" And IsDelOrBack = False Then

           Me.Txt2.Visible = True
    Else

           Me.Txt2.Visible = False
    End If

David
 
or in the after update event for the first textbox

if len(nz("textboxname",vbnullstring))>0 then
secondfield.visible = true
secondfield.setfocus
else
secondfield.visible = false
end if
 
Fantastic, I managed to get DCrake's code working, although thank you both. Couple more issues I have are that it works for the first record but when I move to another record; the second text box remains visible. And the text entered in the first text box carries over to the next record, is there a way for the text box to go back to being blank for each new record?
 
Simple Software Solutions

Ok

Go to the form properties and select the OnCurrent Event

And code the following

Me.Txt1 = ""
Me.Txt2 = ""
Me.Txt2.Visible = False

David
 
Excellent, thanks. One last request, is there any way I can force the user to have to enter data in the second text box after they've entered the data in the first one? The validation rule in the second text box only forces the user to enter the same data after the user has clicked in the second text box, so obviously theres a slight limitation at the moment.
 

Users who are viewing this thread

Back
Top Bottom