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!

Using Access to import certain fields from a .csv file into a report

Status
Not open for further replies.

zone99

MIS
Jul 29, 2004
6
US
I have a .csv file that I generated today, and Access has put it into a table view. One of the columns has identification numbers, and another column has information. How can I generate a report that would have several fields (I can do each field individually if I can get this one piece of code down) with something like "if column 4 = "432", display column 5" (obviously displaying only the information in the same row). Is this possible, and how would I do it?
 
Could you please provide some sample data and how exactly you would like this displayed in a report?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Here is part of the .csv file --

Report,,,263,Operating System,Microsoft Windows XP Professional 5.1.2600 (WinXP Retail)
Report,,,264,Date,2004-07-29
Report,,,265,Time,15:01
Summary,,Computer,513,Operating System,Microsoft Windows XP Professional
Summary,,Computer,540,OS Service Pack,Service Pack 2; v.2149
Summary,,Computer,564,Internet Explorer,6.0.2900.2149

I want to generate a report of several computers in my office, using this type of information with a report I generated with AIDA32. In the report, I will make a text box that will say "Operating system" but I want it to dump in that "Microsoft Windows XP Professional 5.1.2600 (WinXP Retail)" into another text box right next to the "Operating System" one. I thought the best way to determine which one would be using the "263" because if I do it by row number, it could change depending on how many lines certain things have, but that 263 is a unique identifier to the operating system section. Hope this is enough information to you...
 
Here is a sample portion of the .csv file --

Report,,,263,Operating System,Microsoft Windows XP Professional 5.1.2600 (WinXP Retail)
Report,,,264,Date,2004-07-29
Report,,,265,Time,15:01
Summary,,Computer,513,Operating System,Microsoft Windows XP Professional
Summary,,Computer,540,OS Service Pack,Service Pack 2; v.2149
Summary,,Computer,564,Internet Explorer,6.0.2900.2149

I am using a program called AIDA32 to generate a report of all the systems in my office. I want to be able to dump a .csv file into access and have Access generate a report with only specific information on it... As you can see from the sample, I wouldn't need the date, time, and the operating system twice. In the report, I will make a text box that says "Operating System" and next to it, I want it to dump in the "Operating System,Microsoft Windows XP Professional 5.1.2600 (WinXP Retail)" into a new textbox. It should also use that 263 because it is a unique identifier to that specific portion of the report. Hope this is enough info... Thanks so much for your help.
 
I don't really see how each of these records relate to each other. Are they all from one work station or are there multiple. There is nothing in one record that relates to any other record.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Yeah, that 263 that you saw in the .csv data would be the same if I generate a report of another computer, and thats what I want to use to identify it because once you get further down, it goes into dll information and which dll files you have and that could throw off any row numbers between different computers...
 
Again and how exactly you would like this displayed in a report?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Well, I have about 200 computers that I have to generate a report of. I have a program called AIDA32 that makes a .csv file, but gives way too much information. I don't care about every single .dll file on my computer, and I only want to put certain fields into the report, such as processor speed, Operating system, etc. AIDA32 uses that "263" in column 4 to universally identify the operating system in every single report, and thats why column four is going to determine what information is displayed from column five.

So basically, I have my report, and the Report header is "Computer 001 Report". The Page Header has a column on the left that says "Category" and the column on the right says "Data". In the details, I have made a text box on the left that says "Operating system". I made another text box next to that which is where I need it to dump the data into. I need it to take the data from where that Operating System information is and put it into that text box. From there, I am just planning on making another text box to say "Service Pack" and next to it, have the same basic code, but have it show whatever is in column five after the number "540" from column four. I hope this is enough information. And thanks again for your help.
 
When you state "I only want to put certain fields into the report" don't you mean you want to filter out many "records"? Are you always filtering based on the value of column 4? If so, create a table of all desired values from column 4. You may want to add a field that describes the value. Then create a query that joins the two column 4s so that only the desired records are output.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top