Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    5

    Problem with SetValue Macro on Form


    I have a form I've designed that stores the date and time we called a customer, and for it's original intention it works. The user presses the button I created, and it autofills the Text box with the current date and time. Well now our users need to be able to record mutiple calls, a max of three in the event the get no answer, or someone is unavailable, etc. the problem is that if you click the button more than once, it just replaces the value in the field. i need it to append the value below the previous one to show that more than one call was made. I don't want to create extra fields, I'd rather just keep it in the current one. Thanks in advance for any help and/or insight into this you can provide.

  2. #2
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    I think you may want to create an additional table for recording customer interaction. This will be a history table and have a 1 to many relationship with the customer table. Instead of requiring a user to press a button to record a date/time, have the default set to now().

  3. #3
    Join Date
    Mar 2011
    Posts
    5

    Built what they wanted

    While I see the possibility, they wanted it in the specific place, and every time I change something on the form, it screws up the VBA code for some reason, so I what i did was just expand the field, and what I want it to do is append the date to the end of the field instead of replacing it.

  4. #4
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    Your code should look like:

    me.control.value = me.control.value & " " & date()

    That way the new date is appended...instead of replacing the old value.

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

Similar Threads

  1. active X macro problem
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-28-2011, 12:13 PM
  2. Replies: 0
    Last Post: 01-12-2011, 12:43 PM
  3. Macro problem
    By HelenP in forum Forms
    Replies: 3
    Last Post: 10-29-2010, 06:24 AM
  4. Form Dlookup macro
    By lukekelly in forum Forms
    Replies: 2
    Last Post: 01-20-2010, 06:24 AM
  5. Replies: 2
    Last Post: 09-30-2009, 09:40 AM

Tags for this Thread

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