Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro macro macro

Status
Not open for further replies.

claudeb

Programmer
Nov 23, 2000
140
CA
hi,
i have to run a macro for every item in one of my directories. i find it very boring and time consuming.
1/open the item 2/choose "macro" 3/hit "run".
then back to square one.
is there a way, i could do these 3 steps for each table in my directory just by running only one macro ?
thanks
claudeb
 



I need some help, righting a macro to import a file to a table from an e-mail then to place that imported file in a folder. Or to right a macro to import a file to a table from a folder then place that imported file in another folder. Deleting the old file in the folder it was imported from.

I sure could use your help.

arinkydink
 
Hi Bill,

Thank you for all your help so far.

I sen you this post by e-mail, but just in case you didn't get it or in case somebody else might beable to help out. I am posting here.


I went over your file and you have setup 3 tables, tblFolders, tbl Import Temp,
and tblMain. I also see and understand, to a small degree what your query does,
I see you have created a form. Then I see you have created a module, which I
know nothing about. I am new to Access but I now how to create tables, forms,
queries and reports.

In my current Access database which is a test template. The data file is not
completed yet, the last step in finishing this database file is what your are
helping me with.

I am confused in how I should implement what you created, your tables, query,
form, and module. I don’t now how to implement your creation into my existing
database file. I like to give you a little further detailed understanding of my
current database file, which contains more then one table, but there is only
one table I want to import to. It already contains queries, but none should
interfere with your creation, it contains forms and reports.

My questions is in regards to what aspects of your file do I take and how do I
implement them into my database file.

My thoughts on what I should do are:

Take your query:

INSERT INTO tblMain
SELECT tblImportTemp.*
FROM tblImportTemp
WHERE (((tblImportTemp.F1) Is Not Null));

Change the tblMain to the name of the tbl name I want to import to, but you
have created three tables and your query only mentions two? What do each of
your tables represent and how are they associated in you query? When you answer
this I will hopefully understand a little more and I will be able to ask more
detail question or come up with a solution myself.

In your form:

I would just copy your form and implement into my database file, but I will
have to change the paths directories on the, to be processed folder and the
processed folder. The paths are E:\FileImport\NotProcessed and
E:\FileImport\Processed. They will change to the location were my folders are
located? Do all files that are going to be imported need to be in the path
E:\FileImport\NotProcessed or can they be imported from an e-mail?

In your module:

I don’t know much about modules, but my thoughts are to copy and paste what you
created into my database file.


Overall I don’t know if what I stated above is correct or not.

I sure could use your help.

arinkydink
 
Hi Bill,

I really could use your help.

I believe I understand how to take what you did and design it into my data base template. The two problems I am having right now are as follows:

I don't want to use two tables, I only want the data to insert into one talbe. I have tried changing all your tblmains to tblImportTemp, but I get double the data in tbleImportTemp.

Please help.

The other problem is I can't figuire out how to create a browse button in the Form, I did a hyperlink but it only shows me the file and doesn't insert into the file to import area.

You have done a great job I really appreciate it, thank you.


I really could use your help.

Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top