confirmation pop up

travismp

Registered User.
Local time
Today, 15:03
Joined
Oct 15, 2001
Messages
386
I want to make an entry form with about 20 fields. 2 of the fields are number based and are often entered incorrectly. I need to make my users enter those two fields twice to confirm accuracy.

Is it best to have some sort of pop up window for confirmation or just have the field twice on the normal entry screen? Has anyone else seen an example of a confirmation field of sorts? thanks.
 
why don't you just use a combo box to force the user to select the available correct entries? (e.g., select from male or female, rather than typing M, F, man, woman, it, mr, mrs..... etc...) except that your combo would have your required number entries...
 
I am not really sure what you are asking. I do know that I cannot have a value list because the number changes with each record. One field is a Social Security field and the other field is a 10 digit code randomly signed to the record we are typing in at that moment and will never repeat.
 
ah, so you want to make sure the SS field is correct, otherwise that would cause massive issues in ID of individual...

you can create a mask for the field in the table setup, would this help?

otherwise, you would create two text fields, one you would have the user input the number, i suggest you disable the clipboard for this text field (not sure if this is possible, but it would rprevent the user copy/pasting and already incorrect number).

then in the second text field, you could have a check code similar to that below (i haven't checked this works), in the after update of the second textbox:

Code:
if Me.textbox2.value = Me.textbox1.value then
   MsgBox "data entered", vbOKOnly, "Numbers match"
else
   MsgBox "numers must match, please check your numbers and try again", vbOKOnly, "Numbers DO NOT match"
   Me!textbox1.Value = Null
   Me!textbox2.Value = Null
   Me!textbox1.Setfocus
endif
(gurus here may want to confirm that this is the best option...)

and i don't know why you would want to re-type a randomly generated number back into the table - can't you just save the number it generates and make it not editable? or is this number generated by a completely different system to the database you're talking about?
 
The best method, IMHO, which is often required by websites in situations such as when a new member enters a password, would be to require that the data to be entered a second time. Here's some sample code, where the first textbox for the Social Security Number is SSN1 and the confirmation textbox is SSN2:

Code:
Private Sub SSN2_AfterUpdate()
If Me.SSN1 <> Me.SSN2 Then
  MsgBox "Social Security Numbers Entered Do Not Match! Please Re-enter!"
  Me.SSN1 = ""
  Me.SSN2 = ""
  Me.SSN1.SetFocus
End If
End Sub

It compares the first SSN entered to the second, and if they don't match, pops up a messagebox and resets both textboxes for a new try.

Linq
 
Last edited:
now we are getting some where. THANK YOU SO FAR.

1.) I like the idea of two text boxes one that double checks the other with clipboard disabled. can the copy/paste be disabled just for the one form?

2.) the randomly generated number comes from an outside source. when we get the paperwork it alreay has the random number on it. So it is nothing we control or generate.
 
OMG! Great minds think alike! People in Woy Woy actually do something besides waiting for Spike Fest!

Linq
 
do you know of any examples out there similar to this so I can see an example of a access db that utilizes similar code?
 
...the randomly generated number comes from an outside source. when we get the paperwork it alreay has the random number on it. So it is nothing we control or generate.

So this number is being manually entered into the form? If so you need to do the same kind of verification to insure it's copied correctly.

In answer to your last question, no, I've never seen this in an Access database.
 
You are correct. The information comes to us with the number already supplied. We then enter it into the system. I will try to play with the codes you have provided to see if I can make it work. Thank you so far.

Anyone else want to add any examples please feel free to jump in. Thanks.
 
MISSINGLINQ,

I just set up a new form and it works almost perfect already. Right now if I type a different number into SSN2 field it does give the pop up error. As soon as I hit "OK" to go make the change it brings up the Microsoft Visual Basic Debug Popup. I then have to hit "End" to continue. Can I make any changes for that NOT to pop up after the message window?
 
Code works correctly for me! Copy and post the exact code you're using. What line is highlighted?
 
Here is all of my code.


Private Sub SSN2_AfterUpdate()
If Me.SSN1 <> Me.SSN2 Then
MsgBox "Social Security Numbers Entered Do Not Match! Please Re-enter!"
Me.SSN1 = ""
Me.SSN2 = ""
Me.SSN1.SetFocus
End If
End Sub
 
Are you fields actually named SSN1 and SSN2? If not, you need to substitute your actual names.
 
Time for bed. I will revisit at 8:15 am. THANK YOU ALL for the help thus far.
 
weeeeeell, i was born in poland, grew up in newcastle (australia), i work in sydney (westmead - just outside parramatta). but i live in woy woy ;-)
 
the other thing about something like social security numbers is that there MUST be a validation routine somewhere

i'm not sure what format a US number is, but

say AB123456 is valid then
AB123457 probably isnt

there will be some sort of calculation/modulus check. If you can establish what that is, then you can even verify that a number is legal and well formed , as well (or instead) of entering it twice.

---------
you generally use a double entry technique with passwords though, especially if you use a password mask on the field
 
My field other than social is a field called COC. Each 'COC' number is 10 digits long and all numbers. We have issues every month of multiple employees transposing numbers. By making them enter the number twice to make sure they match it should catch any transposing issues.
 

Users who are viewing this thread

Back
Top Bottom