Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 7th, 2006, 06:37 AM
Authorized User
 
Join Date: Dec 2003
Location: Vashi, Navi Mumbai, Maharashtra, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default text file convert to table

hi
I received bank statment as text format as below
filename date mode amount
nbicici060607 06-June-06 D 1500
nbicici150606 15-June-06 W 5000
Now I want covert as table
please help me how should I convert the text file as table

Mohamed Mohiddin
Officer
__________________
Mohamed Mohiddin
Officer
Reply With Quote
  #2 (permalink)  
Old August 8th, 2006, 11:51 PM
Authorized User
 
Join Date: Jul 2006
Location: Kolkata, West Bengal, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default

hi mohiddin

     this is pramod from india .. right now i am working on same project
     see this goes like this

1. VBA read each whole line as record in text file
2. after reading a line you have to code like ( starting from position 1 to 6 is field - filename)
3. thats how we can store the data in CSV ( comma seperated files )
4. then we can directly import to access database

I can help u with this , just let me know u can mail me at sparsh_mba2003@yahoo.com


Thanks and Regards
Lawson, COBOL
Reply With Quote
  #3 (permalink)  
Old August 9th, 2006, 07:17 AM
Authorized User
 
Join Date: Dec 2003
Location: Vashi, Navi Mumbai, Maharashtra, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Lawson, COBOL
Thanks for your replay
Actually I am a new user of access I am working in MTNL in accounts section every month we received text file bank statement from bank in a Floppy. regularly
I converting the text file in Foxpro. But now I make a table in access tblBank actually I want when I go the click the button in form I want detail click event code step by step please explain me


Mohamed Mohiddin
Officer
Reply With Quote
  #4 (permalink)  
Old August 9th, 2006, 08:28 AM
Authorized User
 
Join Date: Jul 2006
Location: Kolkata, West Bengal, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default

hi
  ok better u send me the input file ... so that i can look at it ... and then i will be able to tell u ....what kind of coding is required ok

Thanks and Regards
Lawson, COBOL
Reply With Quote
  #5 (permalink)  
Old August 11th, 2006, 07:57 AM
Authorized User
 
Join Date: Dec 2003
Location: Vashi, Navi Mumbai, Maharashtra, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi
In Access my table name is tblBank there are 4 fields like filename,date, mode, amount field now In my table I want append from Floopy in bank statment in text format like below
filename date mode amount
nb010606_s 01-June-06 D 1500
nb020606_c 02-June-06 C 2500
nb050606_e 05-June-06 W 5000


Mohamed Mohiddin
Officer
Reply With Quote
  #6 (permalink)  
Old August 14th, 2006, 01:10 PM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Location: Boston, MA, USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The simplest way to do this is to go to File/Get External Data/Import and when the Text Import Wizard comes up select the Fixed Width option. You should be able to click on the Advanced... button. Here you can set all the field names, lengths, and types. At this point I usually set all the field types to text. It tends to be easier just import like this, clean up (in the resulting table) some "bad" numbers in any numeric fields, and then change the field to the appropriate numeric type.

-Phil-
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Text(Sql Server Text Field) to Image(JPG) srinivas72 ADO.NET 2 February 13th, 2009 06:31 PM
Read Text file and convert to Binary file VB.net sjlsysprg1 Pro VB.NET 2002/2003 4 June 29th, 2007 06:53 AM
A parsed text file to an Access table? josmith2 ADO.NET 0 May 10th, 2007 01:52 PM
A parsed text file to an Access table? josmith2 VB Databases Basics 0 May 8th, 2007 07:13 AM
How to convert Binary file to Text File pbassett Beginning VB 6 1 May 9th, 2006 03:51 AM



All times are GMT -4. The time now is 09:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.