PC Review
Forums
Software
General Software
Help with Microsoft Access Form Design.
Forums
Software
General Software
Help with Microsoft Access Form Design.
![]() |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
New Member
|
Hi,
I have created a form in Access with the following VBA code; Private Sub Command4_Click() On Error GoTo Err_Command4_Click If userid = "" Then MsgBox ("YOU CANNOT ADD A NEW RECORD AT THIS TIME AS YOU DIDNT PROVIDE YOUR INITIALS!") Exit Sub End If Me.AllowAdditions = True DoCmd.GoToRecord , , acNewRec Date = Day(Now()) & "/" & Month(Now()) & "/" & Year(Now()) author = userid Me.AllowAdditions = False Exit_Command4_Click: Exit Sub Err_Command4_Click: MsgBox Err.Description Resume Exit_Command4_Click End Sub Private Sub Form_Load() DoCmd.Maximize userid = InputBox("PLEASE ENTER YOUR INITIALS TO PROCEED!", "User Id") Command4.SetFocus End Sub It works to the point that it asks you to type in your initials to proceed, but I cannot get it to add that information to a field in the form. Can someone please help? Thanks Last edited by spike250 : 04-07-2009 at 05:50 PM. |
|
|
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

