Results 1 to 3 of 3
  1. #1
    clarkej is offline Novice
    Windows XP Access 97
    Join Date
    Nov 2010
    Posts
    12

    text boxes

    hey

    on my form i have several memo boxes for advisors to fill in as they deal with elements in the database.

    my question is this, is there a way to prevent anyone editing that information after the form has been saved or closed, when ever they go back into it, but still be able to use the other memo boxes. i also want the date and time to auto fill in when ever someone types something into these memo boxes?

    are either possible?

    thanks
    Jay

  2. #2
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows XP Access 2003
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209

    text boxes

    Through the Current Eventprocedure of the Form you can check whether the Memo field have some value in it, if so disable the field otherwise allow data entry.

    Sample code is given below.

    Code:
    Private Sub Form_Current()
    Dim xNotes
    xNotes = Me![Notes]
    If IsNull(xNotes) Then
        Me.Notes.Enabled = True
    Else
        Me.Notes.Enabled = False
    End If
    End Sub
    On_Change() Event Procedure of the Memo field can be programmed to enter the current date/time into a field.

  3. #3
    jlclark4 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Dec 2010
    Location
    North Carolina
    Posts
    155
    Quote Originally Posted by apr pillai View Post
    Through the Current Eventprocedure of the Form you can check whether the Memo field have some value in it, if so disable the field otherwise allow data entry.

    Sample code is given below.

    Code:
    Private Sub Form_Current()
    Dim xNotes
    xNotes = Me![Notes]
    If IsNull(xNotes) Then
        Me.Notes.Enabled = True
    Else
        Me.Notes.Enabled = False
    End If
    End Sub
    On_Change() Event Procedure of the Memo field can be programmed to enter the current date/time into a field.

    In this example, is "Notes" needing to be replaced with what ever the box is names? and if so, I would need to set all the boxes with this code in each to allow feilds with nothing in them to be editted when opened again? Does the form need to be set to read only or does this code do that for you?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 09-18-2010, 01:19 PM
  2. characters in text boxes
    By Matthieu in forum Access
    Replies: 0
    Last Post: 04-08-2010, 11:02 AM
  3. Replies: 2
    Last Post: 03-30-2010, 05:08 PM
  4. joining text in text boxes
    By jjwilliams73 in forum Forms
    Replies: 1
    Last Post: 08-26-2008, 02:30 PM
  5. bounding text boxes
    By nosirrah69 in forum Database Design
    Replies: 2
    Last Post: 02-23-2006, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums