Text File

  • Thread starter Thread starter Garyj
  • Start date Start date
G

Garyj

Guest
I am trying to convert a text file to an access database but I am unable to get the format readable. How do I take a text file import in access correctly.

Can anyone help me
Thanks you
 
I'll give it a go.

1. Is the text file delimited in any way?

2. Are you trying to import it manually or through code?

If you are unsure of the whole process, I will try to break it down.

1. Open Access
2. When it starts it will display a window for opening a new Blank database or selecting an existing or previously opened DB.
3. Select Blank Access Databse at the top, and follow the screens for naming it and saving it where you want.
4. You now have a New Blank "empty" database file.
5. From the File menu at the top, hover over "Get External Data" and a side menu will open, Select the "Import..." option.
6. It will open a wizard for selecting the file, this is where you tell it it is a text file and it will guid you through the import process.
7. When it's done you should have your text file data inserted into the database as it's own table.

Start with this and come back if you still have problems or questions.
 
Forms: Autofill a specific field in a new record

Thank you for your help. I haven't looked at the file yet but I will today. Also, if you please could take a look at my other post on forms. I would appreciate it. I found a could off of microsoft support center and it works but I am unable to have the endingbalance of the previous record goto the beginningbalance of the new record. I have placed an attachment of the code that does work I wanted to just bring down the fields of the previous record to the same fields to the new record. Could take a look at this and see if you can get it.

Thank you in advance.
 

Attachments

text file

I have done all that you advised but the text file that came over is listed in one field labeled field1. I can't make heads or tails of it. I would like to bring it in evenly with field specific field names. Placing the date in a date field as an example.

:confused:

Thanks
 
in the import routine, you will find an option to name and define (text, number, date) each field. You must have missed this somehow.Did you specify the correct delimiter (commas, usually)
 
Yes, like ancientone posted, how is the text file delimited, if everything imported into just the one field then you selected the wrong delimeter.
 
text file

I was able to convert a text file into Access but first I converted it into an excel spreadsheet. This worked well when I imported the file as a link. However, how do I import this file into access automatically plus give the users the option to add fields when needed? I think I may need some kind of code to do this but I am not sure how to write it.

On another note I am very new in writing VBA code. What books do you recommend for beginners. Like what is Dim, Variables, Do Loop, Do While, Constant, etc... I need a book that will break it down simply so I can begin to understand how write code.

Thanks alot
 
There are ways to get text files into access through code I do it all the time, upload an exampe of the text file your trying to import and I can tell what is probably the best method, but creating and saving a custom Spec file will probably be the solution.

If your wanting to know a good book for beginers I actually have to recommend the following, you'll laugh but I really do recommend them.

Access 97 Programming for Dummies

Access 2000 Programming for Dummies
 
Sample Text File

Thank you

Here is a sample of a text file that I am trying to upload automatically. I was able to modify the text file through excel and then import it. Which worked fine but I would like to have the user select the file to be imported from a server then have access convert it into a table. Also, if possible be able to add two or four new fields that will be manually keyed via a form. I have a total of six different text file here is one sample.

Thanks
 

Attachments

I hate to be the bearer of bad news but dude, there is no way that access or anything can import those files it that pretty nicely layed out "Report Format" and have any inteligible or usable data. It looks like you had a report that you saved as an RTF file and renamed to TXT.

When users on this site or other programmers talk about importing a text file they mean a Delimited Text File.

If you can Export just your data to a Delimited text file then you'll be in business and we can help you.

I attached a file that has some of your data from one of your reports that is comma delimited, but i had to do this manually, so you could see what it might look like, but you need to have your app do this automatically before you can have access import it automatically.
 

Attachments

Text file to excel

OK thank you very much.

Question: I have taken the same text file that I posted and was able to convert it to excel and manually add additional fields. How do I import this file automatically and then have access create a table for that file? Note: I want to be able to select one of the six files that lay out on the server and then convert it to a table. Is this possible? If so how?

The process that I am thinking would go like this.

Open my form where I would click a button whichwould run a code or macro then the browser would open up. There I can select one of my excel files and then automatically it would create a table based on that file.

Thanks
 

Users who are viewing this thread

Back
Top Bottom