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
|
|||
|
|||
Enter Data Twice To Validate
I am building a simple database to track cash receipts and would like to
require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
#2
|
|||
|
|||
Enter Data Twice To Validate
Not that difficult. You need two text box controls - txtAcct1 and txtAcct2
Set the Tab Stops so that txtAcct1 is just before txtAcct2. In design view, make txtAcct2 Enabled property = No. (This is so the user has to enter the first one before the second one.) Make txtAcct2 the bound control and txtAcct1 an unbound control. Also, put the following line of code in the Current event of the form: Me.txtAcct2.Enabled = False In the Before Update event of txtAcct2 If Me.txtAcct1 Me.txtAcct2 Then Cancel = True MsgBox "Incorrect Account Number" End If "Jeff C" wrote: I am building a simple database to track cash receipts and would like to require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
#3
|
|||
|
|||
Enter Data Twice To Validate
Thank you Mr. Klatuu
-- Jeff C Live Well .. Be Happy In All You Do "Klatuu" wrote: Not that difficult. You need two text box controls - txtAcct1 and txtAcct2 Set the Tab Stops so that txtAcct1 is just before txtAcct2. In design view, make txtAcct2 Enabled property = No. (This is so the user has to enter the first one before the second one.) Make txtAcct2 the bound control and txtAcct1 an unbound control. Also, put the following line of code in the Current event of the form: Me.txtAcct2.Enabled = False In the Before Update event of txtAcct2 If Me.txtAcct1 Me.txtAcct2 Then Cancel = True MsgBox "Incorrect Account Number" End If "Jeff C" wrote: I am building a simple database to track cash receipts and would like to require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
#4
|
|||
|
|||
Enter Data Twice To Validate
Klatuu:
Is it possible there is something crossed up?? I receive an error,"The expression OnCurrent produced the following error:A problem occurred while communicating with the OLE serve......" When I enabled = No on txtAcct2 it is grayed out and will not allow an entry. Thanks -- Jeff C Live Well .. Be Happy In All You Do "Klatuu" wrote: Not that difficult. You need two text box controls - txtAcct1 and txtAcct2 Set the Tab Stops so that txtAcct1 is just before txtAcct2. In design view, make txtAcct2 Enabled property = No. (This is so the user has to enter the first one before the second one.) Make txtAcct2 the bound control and txtAcct1 an unbound control. Also, put the following line of code in the Current event of the form: Me.txtAcct2.Enabled = False In the Before Update event of txtAcct2 If Me.txtAcct1 Me.txtAcct2 Then Cancel = True MsgBox "Incorrect Account Number" End If "Jeff C" wrote: I am building a simple database to track cash receipts and would like to require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
#5
|
|||
|
|||
Enter Data Twice To Validate
Select the properties dialog for the form.
Select the Events Tab Select the Current Event. The code goes there. As to the other problem, oops! My intent on disabling txtAcct2 is to require the user to enter txtAcct1 first. To cure this problem, put this in the After Update event of txtAcct1 If Not IsNull(Me.txtAcct1) Then Me.txtAcct2.Enabled = True Me.txtAcct2.Setfocus End If "Jeff C" wrote: Klatuu: Is it possible there is something crossed up?? I receive an error,"The expression OnCurrent produced the following error:A problem occurred while communicating with the OLE serve......" When I enabled = No on txtAcct2 it is grayed out and will not allow an entry. Thanks -- Jeff C Live Well .. Be Happy In All You Do "Klatuu" wrote: Not that difficult. You need two text box controls - txtAcct1 and txtAcct2 Set the Tab Stops so that txtAcct1 is just before txtAcct2. In design view, make txtAcct2 Enabled property = No. (This is so the user has to enter the first one before the second one.) Make txtAcct2 the bound control and txtAcct1 an unbound control. Also, put the following line of code in the Current event of the form: Me.txtAcct2.Enabled = False In the Before Update event of txtAcct2 If Me.txtAcct1 Me.txtAcct2 Then Cancel = True MsgBox "Incorrect Account Number" End If "Jeff C" wrote: I am building a simple database to track cash receipts and would like to require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
#6
|
|||
|
|||
Enter Data Twice To Validate
AAAAAHHHHHHHHHH
Appreciate your help Klatuu -- Jeff C Live Well .. Be Happy In All You Do "Klatuu" wrote: Select the properties dialog for the form. Select the Events Tab Select the Current Event. The code goes there. As to the other problem, oops! My intent on disabling txtAcct2 is to require the user to enter txtAcct1 first. To cure this problem, put this in the After Update event of txtAcct1 If Not IsNull(Me.txtAcct1) Then Me.txtAcct2.Enabled = True Me.txtAcct2.Setfocus End If "Jeff C" wrote: Klatuu: Is it possible there is something crossed up?? I receive an error,"The expression OnCurrent produced the following error:A problem occurred while communicating with the OLE serve......" When I enabled = No on txtAcct2 it is grayed out and will not allow an entry. Thanks -- Jeff C Live Well .. Be Happy In All You Do "Klatuu" wrote: Not that difficult. You need two text box controls - txtAcct1 and txtAcct2 Set the Tab Stops so that txtAcct1 is just before txtAcct2. In design view, make txtAcct2 Enabled property = No. (This is so the user has to enter the first one before the second one.) Make txtAcct2 the bound control and txtAcct1 an unbound control. Also, put the following line of code in the Current event of the form: Me.txtAcct2.Enabled = False In the Before Update event of txtAcct2 If Me.txtAcct1 Me.txtAcct2 Then Cancel = True MsgBox "Incorrect Account Number" End If "Jeff C" wrote: I am building a simple database to track cash receipts and would like to require an acct number be entered twice correctly, similar to many online purchases where you enter your credit card number twice, so that the acct number is validated. Any ideas out there or could someone poiint me to the documentation on doing this please? Thank you -- Jeff C Live Well .. Be Happy In All You Do |
Thread Tools | |
Display Modes | |
|
|