PC Review


Reply
Thread Tools Rate Thread

Help with Microsoft Access Form Design.

 
 
New Member
spike250's Avatar
Join Date: Sep 2008
Posts: 8
 
      4th Jul 2009
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; 4th Jul 2009 at 04:50 PM..
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Word Table design in Access 2007 JFREE223 Microsoft Access Forms 2 27th May 2010 09:56 PM
Access 2007... create Form and Form design Ahmed Khalak Microsoft Access Forms 0 20th Jan 2008 10:24 PM
how do i design a servey using microsoft access Forms? =?Utf-8?B?QWhtYWQgQWwgSGFyYmF3aQ==?= Microsoft Access Forms 1 2nd Nov 2004 02:44 AM
Microsoft Access, Cant Access Design Menu drdos Microsoft Access Queries 1 2nd Nov 2003 03:50 PM
Microsoft Access Database Design ixeye Microsoft Access Forms 4 22nd Sep 2003 01:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:56 PM.