Results 1 to 4 of 4
  1. #1
    HelenP is offline Novice
    Windows 2K Access 2000
    Join Date
    Oct 2010
    Posts
    16

    Cool Macro problem

    Hello,



    How can I create a macro that allows people to import data and then run an update query by just clicking one button?

    Thanks in advance

  2. #2
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    This site will help i think:

    http://www.databasedev.co.uk/text-import-macro.html
    http://www.databasedev.co.uk/open-query-macro.html

    Remember that google holds useful information!

    Have a go, if you get stuck come back with what the problem is.

    Good luck
    Last edited by Rixxe; 10-29-2010 at 04:08 AM. Reason: Detail

  3. #3
    HelenP is offline Novice
    Windows 2K Access 2000
    Join Date
    Oct 2010
    Posts
    16
    Thanks, I have now managed to do that but have realised that it is not quite what I want.

    People will be importing different spreadsheets so I need a way of allowing the user to enter the filename of the spreadsheet they want to import. Is this possible?

    Thanks again

  4. #4
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    You're welcome.

    To allow someone to enter the name of the file in order for a macro to work, perform its task, and then finish, you will need more than just a macro.

    Some code or/and maybe a form depending on how you want it to look might be an idea. (Research command buttons on forms)

    Or the way i would get around it, (I know its not great if its for clients) is to ask whoever is going to use the Macro to change the name of the file that will be imported. Create a message at the start of the Macro to say 'Is the file named
    'Database.txt'?' or something.

    This obviously depends on what your macro/macros are going to do.

    Good luck
    Last edited by Rixxe; 10-29-2010 at 06:26 AM. Reason: Spelling

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

Similar Threads

  1. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  2. Need help with macro
    By abc123 in forum Programming
    Replies: 6
    Last Post: 06-13-2010, 12:34 AM
  3. MACRO help please
    By DianeG in forum Forms
    Replies: 2
    Last Post: 04-20-2010, 07:19 AM
  4. Replies: 2
    Last Post: 09-30-2009, 09:40 AM
  5. Access Macro
    By Gargen in forum Access
    Replies: 0
    Last Post: 09-14-2009, 09:13 AM

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