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
|
|||
|
|||
Input Required
I developed a input form for users to input and one of the fields is
expiration date - I know that I can make that a required field, but can I make a more custom-designed message using VBA code that would prompt the user to input an expiration date if they tried to get off the expiration date field ? -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
On Tue, 27 Sep 2005 22:27:43 GMT, "Steven R via AccessMonster.com"
u12024@uwe wrote: I developed a input form for users to input and one of the fields is expiration date - I know that I can make that a required field, but can I make a more custom-designed message using VBA code that would prompt the user to input an expiration date if they tried to get off the expiration date field ? Well, what would you do if they never set focus to the expiration date field at all!? Instead, use the Form's BeforeUpdate event: Private Sub Form_BeforeUpdate(Cancel as Integer) If IsNull(Me!txtExpirationDate) Then MsgBox "Expiriation date must be filled in", vbOKOnly Cancel = True Me!txtExpirationDate.SetFocus End If End Sub John W. Vinson[MVP] |
#3
|
|||
|
|||
John,
Thanks ! Steve John Vinson wrote: I developed a input form for users to input and one of the fields is expiration date - I know that I can make that a required field, but can I make a more custom-designed message using VBA code that would prompt the user to input an expiration date if they tried to get off the expiration date field ? Well, what would you do if they never set focus to the expiration date field at all!? Instead, use the Form's BeforeUpdate event: Private Sub Form_BeforeUpdate(Cancel as Integer) If IsNull(Me!txtExpirationDate) Then MsgBox "Expiriation date must be filled in", vbOKOnly Cancel = True Me!txtExpirationDate.SetFocus End If End Sub John W. Vinson[MVP] -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200509/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Input Form vba help | mdalzell | General Discussion | 0 | April 8th, 2005 03:57 PM |
unable to repair inobox | Sudheer Mumbai | General Discussion | 1 | February 20th, 2005 11:55 AM |
Input Mask | Loi | New Users | 1 | November 18th, 2004 05:44 PM |
"Input" data sheet | Kev | General Discussion | 0 | November 3rd, 2004 12:15 PM |
Auto input? | Crystal | Worksheet Functions | 0 | February 10th, 2004 09:10 PM |