Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Memo Field (A2K)

    OK...I don't know if or how this can be accomplished, but I don't know of a better forum to find out.

    I need to know if a memo field can do the following:

    1. A time stamp and User's Initials inserted as the user begins to enter data.---Can this be done, and if so, could someone point me in the right direction?

    I'm going to enter "the brown cat ran away"
    i.e. 6/12/07 rlp The brown cat ran away

    2. Once the user is done inputting data and exits the memo field the data that was just put in, can it be locked.--Can this be done, if so, could someone point me in the right direction?

    i.e. 6/12/07 rlp The brown cat ran away is now dimmed

    If I re-enter the memo field, what was previously entered is dimmed, but I can continue to enter another note, and like before, once I'm done, that data is also dimmed.

    Thanks for any suggestions, it's greatly appreciated.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Memo Field (A2K)

    Hi Roberta

    I have #1 sorted for you, just trying to get #2 done

    Private Sub MemoField_AfterUpdate()
    Me.MemoField = Format(Now(), "MM/DD/YYYY") & " " & Me.MemoField


    End Sub

    Obviously change the name of MemoField to the name of yours
    Jerry

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Memo Field (A2K)

    Are you going to use this field to enter comments for different days?

    If so, why dont you create another table that contains the ID back to the main table, a date and comment fields, then just introduce a subform to cater for this.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Memo Field (A2K)

    I'd go with Patt's suggestion. You cannot lock or "dim" part of a field, so it's much better to store the notes in a separate table, with a new note for each new comment. Put a date field in the table with Default Value set to =Date().
    You can lock the notes text box if it's not empty, in the On Current event of the (sub)form used for entering the notes.
    As to the initials, where do you want to take these from?

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Memo Field (A2K)

    I think I came up with a resolution and if it works, I will pass it on in case someone else may be looking for it.

    Here are my thoughts.

    1. Bound Memo Field
    A. disabled
    B. Must store the Date/Time, the User's Initials, and Note # (will us DMAX for this peice)
    C. MUST be visible at all times for everyone to view.

    2. Unbound Memo Field
    A. Enabled
    B. Code to capture the Date/Time, user's initials, date, and note # prior to user entering data in the the UNBOUND memo field.
    C. Once the user exits the memo field, the data will append to the BOUND memo field.

    Like I said, it's something I'm currently working on. At this point I'm not even sure it will work.

    ***As for the users initials, I have a table, tblUser. tblUser houses the following:***
    1. Users First and Last Name (2 fields)
    2. Users Initials
    3. Users LoginID (computer Login ID)
    4. Access Level (which uses another table, tblAccessLevel) which is used for many other thingies.

    My thought at this time is to:
    Use the BeforeUpdate event to:
    A. Retrieve the Date/Time
    B. Retrieve the users initials by using DLookUP based on the login id
    C. insert the (in cronilogical order) next Note # by using the DMAX to retrieve the next # in line based on the project #.

    If someone thinks I'm going down a fruitless avenue, please let me know.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Memo Field (A2K)

    I think that would work, but do you have a compelling reason for wanting to put all the notes into a memo field in the same record? Conventional database wisdom says that you shouldn't store multiple and disparate items (date, initials, note text) together.
    If you put each note in a separate record, with separate fields for date, initials and note text, it becomes very easy to sort or select notes by date or by username. With everything dumped into one field in one record, you're stuck with a fixed format which will become unwieldy over time.

  7. #7
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Memo Field (A2K)

    I don't disagree with using the memo field for storage. What about this approach?

    New table with:
    1. Date/Time
    2. User Initials
    3. Note #
    4. Memo field
    5. ProjectNo

    Using the UNBOUND memo field, I could then append this data to the newTable on Exit. Leaving the memo field enabled/unlocked.

    As you and Patt suggested, use a subform to link the records to the main form and disable/lock these records. Thus, still allowing the user to input another note (UNBOUND memo field) for the projectno and storing and locking the the "notes" records correctly.

    Doable?
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Memo Field (A2K)

    You don't need an unbound memo field. The user can directly enter a note into the bound field. Use code in the On Current event of the subform to lock / unlock the notes field depending on whether it is filled:

    Private Sub Form_Current()
    Me.Notes.Locked = Not IsNull(Me.Notes)
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •