Results 1 to 5 of 5
  1. #1
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    Error Import Command Button

    Name: Form1
    Drive Location:J:\BYY Goal 7 - 2011
    Excel File Name: Current Customers


    Excel File Type: Macro-Enabled Worksheet
    Table 1 - tblaggregateddata - need to add to table
    Table 2 - Current Customers - need to replace all information in this table with imported data.
    Command Button - Command6 & Command8

    I have been trying to write the proper code to get these to buttons to automatically import the data. Unfortunately everything I have tried has failed. Above are the names from my Access Database and Computer Drive. Could someone please help me write the proper code or figure out a macro in order to add a Command Button?

    Please and Thank you!!!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Here is a sample of what you are trying to do. Look at the VBA code behind the command buttons. Note that this was created to work in an WIN XP operating system, so the paths to and from the excel worksheets will have to be amended, but you should see the overall methodology and should be able to adapt it to your environment.
    Attached Files Attached Files

  3. #3
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    Still getting Error

    Please see attached. I should tell you I am a beginner at Access and my work would like me to be an expert. I appreciate your help!

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    What error are you getting?

    In the Docmd line, remove the parenthesis from the path for a starter.

  5. #5
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    First Error

    Set wb = appExcel.Workbooks.Open(H:\CurrentCustomer.xls) Error - Expected list serperater.

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

Similar Threads

  1. Command Button
    By BLD21 in forum Access
    Replies: 2
    Last Post: 05-02-2011, 04:47 PM
  2. command button
    By berni3883 in forum Forms
    Replies: 17
    Last Post: 04-22-2011, 12:04 AM
  3. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  4. Command Button
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 07-05-2010, 08:02 PM
  5. Command Button Help!
    By arthura in forum Programming
    Replies: 3
    Last Post: 06-30-2009, 12:55 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