Results 1 to 3 of 3
  1. #1
    sosneedaccesshelp is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    1

    Duplicating Date Entries in a Form

    I have a form that includes multiple field entries such as customer name, date of arrival, company name, etc. I would like to add a macro command that will allow for duplicate date entries without clearing out the whole form. I am currently using Access' duplicate command in the design tab which will save all of the data but one must erase the current date and fill it out with a new one. I would like the command to save all of the current data but display the date field as blank when the button is pressed. Any ideas on how to do this? I am using Access 2010.

    Ex: Customer Name- John Doe Customer Name- John Doe
    Date of Arrival- June 4th (when one presses the command Date of Arrival-


    Company Name- Coca-Cola it will save the data but display..) Company Name- Coca-Cola

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    You could have several named and unboundtext boxes on the field.

    when you click the button it fires the on click event and you could use macro code or vba to fill the fields in the record

    I would use vba

    click button and..

    [CustomerName] = me.txtCustomerName
    [date_arrival] = date() <-date function for current date that replaces old date with current one
    [CompanyName] = me.cboCompany (you could type but if you commonly use companies over and over you could make a combo box that pulls from a company name table)

    then move to the next record.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I am not familiar with 'duplicate command in the design tab' - do you mean a command button on form with embedded macro? Could probably have code in the same macro to set the date field to Null. This would require the SetValue action. From macro design, click "Show All Commands" to present the SetValue.

    However, like Ruegen, I don't use macros, only VBA.
    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: 19
    Last Post: 05-13-2013, 01:26 AM
  2. Replies: 4
    Last Post: 02-13-2013, 10:46 AM
  3. Replies: 5
    Last Post: 01-11-2013, 03:54 AM
  4. Multiple Entries sorted by date
    By l3111 in forum Forms
    Replies: 1
    Last Post: 12-12-2011, 11:41 AM
  5. setting up a form for duplicating records
    By phineas629 in forum Forms
    Replies: 4
    Last Post: 10-26-2011, 02:24 PM

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