thank you so much! i will get started with that and let you know how i get on.Attached is a text file that has the basic code () to import a text or csv file. You will also need the code from The Access Web at:
http://www.mvps.org/access/api/api0001.htm
Copy the code and paste it into a standard module. I named my module "modOpenSaveFile".
You will have to figure out how to parse the input string, store the value in a variable, when to know you have reached the end of the data for a specific computer, how to create the SQL append statement. If you are going to update a record in a table, you will need to find the record then update the data.
HTH
------
Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
Hiya, I am trying to paste the code on that website but it i am struggling with it creating loads of different sub's? It is all the code in between the *****code starts here***** and *****code end*****Attached is a text file that has the basic code () to import a text or csv file. You will also need the code from The Access Web at:
http://www.mvps.org/access/api/api0001.htm
Copy the code and paste it into a standard module. I named my module "modOpenSaveFile".
You will have to figure out how to parse the input string, store the value in a variable, when to know you have reached the end of the data for a specific computer, how to create the SQL append statement. If you are going to update a record in a table, you will need to find the record then update the data.
HTH
------
Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
really strugglgin with this as i know nothing about vb scripting
What problems are you having?
To recap:
1) Create a new standard module (not behind a form).
2) Copy the code between the
***** Code start ******* and ******** Code end******
3) Paste it in the new module.
4) Save the new module and rename it "modOpenSaveFile"
You're done.
Now you can use the standard Windows File Open/Save dialog box to select .csv file to import in your code.
thanks for that! So i have made the module as you instructed, put the code from the attached .txt file into a macro builder for the button on click and comes up withWhat problems are you having?
To recap:
1) Create a new standard module (not behind a form).
2) Copy the code between the
***** Code start ******* and ******** Code end******
3) Paste it in the new module.
4) Save the new module and rename it "modOpenSaveFile"
You're done.
Now you can use the standard Windows File Open/Save dialog box to select .csv file to import in your code.
Comile error: syntax error and its on Dim RF As Integer file handle
surely this doesnt do anything? I am using access 2010 is this needed?
Last edited by sliminconcoova; 09-08-2010 at 08:57 AM. Reason: add attachments
can any one answer this?
I have downloaded your last attachment. I will take a look and get back with you shortly.
I fixed the issues that were stopping it from compiling.
I also imported the same data into a table.
Where are you going to store this information?
See the attached.
Hi, thanks for that! At least the box comes up now and you can select the audit's output. It now tells me though that 1335 lines have been found and processed but nothing gets put in.
My question is, does this look for specific strings on the audit output or does it import everything?
If it doesnt, can it do that or am I chasing my tail?
The VBA code is only programmed to loop through the record. There is not any code set to store anything.
Where will you store all the data? All I saw way a single table with only two fields (Computer Name and Domain Name). Is that really all you want to store?
Currently there is only code to read all the records ion the file. There are comments int he code that show where additional code to process and store the data would go. There is not any executing code to save anything.
You will need to write the additional VBA code required to store the data.
If it were mine, I would store everything from the file about a computer. I will also put a date/timer stamp on the data. This way when you run it again and import the data for a computer you will be building a history log.
I see you only have a single table with two fields (Computer Name and Domain Name). Is that really the only two things you want out of all this data?
there will be more fields to store i just limited it to get an idea. This seems to be getting a bit too complicated to me, (although i know nothing about vba scripting etc)
USing excel for an example. You can use lookup to find a value in column c for example and return the value in the cell in the same row. That is what i want to do.
I understand there will may need to be a series of "lookups" as such, so when it finds the value it pastes it into the relevant field of a new record...
i dont know how to simplyfy what i want lol...thanks for all your suport guys, really is appreciated
Do you already have an Acces app created for tracking (storing) this information?
It would help to see the actual tables for where you want to store all teh data.
Would it be possible for you to attach a database with all the actaul tables that you will be using to store this data?
Note: I say tables since this should be relational database. If properly designed to store this data it will require multiple tables.
TIP: Avoid using spaes in tables and field names. Iy make writing queries and VBA code easier.