Results 1 to 7 of 7
  1. #1
    johnexcel is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    10

    Cmd Button Export Data From excel to Particular Table In Ms-Access Vba

    Dear Expert

    I have synchronized 3 Table Like DispatchCalls,ClosedCalls,CancelCalls I need to add data from xls file to these tables day by day

    I want pull data through CMD button in Form to pull data from particular folder extract data from particular file


    For E.g
    I have Dispatch,Closed,Cancel report in paricular folder in xls ,

    If i click Dispatch Button first clear old data in Table then it pull data from this dispatch file to paste into table "dispatch calls"
    If i click Closed Button first clear old data in Table then it pull data from this Closed file to paste into table "Closed calls"
    If i click Cancel Button first clear old data in Table then it pull data from this Cancel file to paste into table "Cancel calls" .

    at any cost table name shouldnt chance.

    find the attachment of Onsiteexport is Ms-Access where data export from excel &
    3 xls file data move to exact table
    Attached Files Attached Files
    Last edited by johnexcel; 05-30-2014 at 06:44 AM. Reason: attachment

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Make a table with the values DispatchCalls,ClosedCalls,CancelCalls ) the user can pick in a combo box.
    This combo would have macros for each value above.
    Click the button, it executes the macro in cboBox.column(1)

    The dspatchCalls value would run macro: mImpDispatch.

    The macro mImpDispatch: would
    clear target table
    import linked xl file data

  3. #3
    johnexcel is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    10
    Dear sir
    can u upload output file? I quite new beginner of ms-access vba?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    Why would you flush the information, why not link directly to the excel files, linking the excel files would be more 'real time' than importing the information once per day.

  5. #5
    johnexcel is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    10
    How to link directly to excel file to msaccess table... ? can u teach step by step? i will do myself I work on 2007 version. please sir

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441

  7. #7
    johnexcel is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    10
    Thanks Master It works Fine ...Amazing Helps.even i learned How to do Import&EXport data.. Thanks alot.

    Can u help on my another thread..
    https://www.accessforums.net/forms/n...tml#post229056
    Last edited by johnexcel; 06-04-2014 at 12:35 AM. Reason: thanks

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

Similar Threads

  1. Export Data to Excel Pivot Table Loss of Formatting
    By Damian in forum Import/Export Data
    Replies: 1
    Last Post: 05-17-2013, 07:56 PM
  2. Replies: 2
    Last Post: 03-19-2012, 05:08 AM
  3. trying to export table data tpo Excel
    By itm in forum Access
    Replies: 2
    Last Post: 01-30-2012, 10:44 AM
  4. Export Access data to Excel
    By kaysersoze in forum Access
    Replies: 0
    Last Post: 01-21-2012, 12:25 AM
  5. Export Excel data to access on a button click
    By Grooz13 in forum Import/Export Data
    Replies: 0
    Last Post: 03-15-2011, 10:02 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