Results 1 to 2 of 2
  1. #1
    Williams485 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2013
    Posts
    42

    Customising 'Add New Record' Button

    Hello Access Forum,

    I have a form that 'creates a new opportunity'. It contains a number of controls bound to fields in a table and a number of unbound fields that provide simple calculations to provide the user with feedback. The table also contains a couple of date-stamped fields (not represented on the form) that must be updated with a button I've created (using the 'Control Wizard') that will create/add the new record to the table.

    The problem I'm having is that I can't seem to find out how to customise the button to say 'just before you update the record, make myTable.myField.value = Now().

    I've looked at a few online resources and tried a couple of things which gave new errors (and these methods may have been running before I can walk), so I've gone back to square 1.

    So, if anyone could point me in the right direction with either, how to modify the existing macro (created by the Control Wizard), OR, a way to code the control manually (I have reasonable VBA experience with Excel but not Access) so if coding will accelerate my Access knowledge then I'm happy to look at this.

    Thanks in Advance...

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If the field is included in the form's RecordSource, should be simply:

    Me!fieldname = Now()
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 22
    Last Post: 06-12-2012, 10:02 PM
  2. Replies: 4
    Last Post: 07-22-2011, 12:52 PM
  3. Replies: 10
    Last Post: 03-21-2011, 02:46 PM
  4. Add new record button
    By smikkelsen in forum Access
    Replies: 0
    Last Post: 03-29-2010, 02:55 PM
  5. Replies: 6
    Last Post: 02-09-2010, 07:53 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