Results 1 to 7 of 7
  1. #1
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94

    How to add List of Names by One Click

    Hi Guys,



    I need a help i have created a simple database for time sheet entry, in that i want to add list of names by 1 click. ie) if i click the button it should automatically add all the names in the entry sheet which i have in my table.....

    please help me out.........

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'd probably create an append query and execute it from the button.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the form button would run a macro "after update" event: like "mRunAddEntry"

    the macro "mRunAddEntry" would have the action
    docmd.openquery
    "qaAddNewTimeEntry"


    the query "qaAddNewTimeEntry" would have like:
    Append * from tNameList


    (or like that)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Probably need an INSERT SELECT action.

    In VBA, something like:

    DoCmd.Execute "INSERT INTO EntryTable(EmpID, EnterDate) SELECT EmpID, Date() FROM Employees;"
    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.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I guess you can't say the same thing too many times.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    Thanks Guys it is Working perfect......

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 04-21-2014, 08:00 AM
  2. How to list all names etc to Print
    By alanfallow in forum Forms
    Replies: 11
    Last Post: 01-16-2014, 01:42 AM
  3. List Box Click Event
    By bginhb in forum Forms
    Replies: 3
    Last Post: 04-09-2012, 02:06 PM
  4. List names in Report
    By Javen in forum Reports
    Replies: 3
    Last Post: 09-15-2011, 01:40 AM
  5. Rotating list of names
    By bkvisler in forum Access
    Replies: 15
    Last Post: 07-27-2011, 06:49 PM

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