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
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
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
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
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