Results 1 to 4 of 4
  1. #1
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13

    Macro to append data to a table from an excel file and adding a value from a textbox

    Good Morning,



    I really apologize if this has been answered. I couldn't find anything the help me and it's most likely because I am not searching anywhere correctly.

    My goal is to append data from an excel file to a table. I successfully did that portion, but what I want to do that I am having trouble with is two parts:

    Part 1- The table has a field for a date. The date is what's entered in a textbox (txtDate) on a form.
    Part 2- The form has two check boxes for the user to indicate if the file is type A or type B. I would like that to go into the table as well.

    Can anyone offer a website that shows me how to do that, or explain how to get what the user enters on a form to also be included in the excel file import?

    Thanks,
    Tex

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Attach the excel file as a table. Create an append query to append the excel table and
    add the form items: the date on the form and a cboBox ( not options,the cbobox has A or B)

    The query will reference the full path to the form items :
    forms!myForm!txtDate
    forms!myForm!cboBox

  3. #3
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13
    Ranman,

    Thank you for the quick response. I will try it out now.

    Tex

  4. #4
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13
    It didn't work. This is maddening.

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

Similar Threads

  1. Import Excel file into an existing table via a macro
    By Gaby2811 in forum Import/Export Data
    Replies: 3
    Last Post: 09-23-2016, 06:12 AM
  2. How do I Append a table with non-delimited txt file data
    By Gotboost858 in forum Import/Export Data
    Replies: 7
    Last Post: 05-14-2015, 01:37 PM
  3. Replies: 2
    Last Post: 02-28-2013, 07:00 PM
  4. Replies: 5
    Last Post: 12-03-2012, 05:03 PM
  5. Importing excel file to append a table
    By vickan240sx in forum Access
    Replies: 1
    Last Post: 06-27-2012, 02:46 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