Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old July 28th, 2003, 09:53 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
yeah, sorry about the mistype. this was an example given to me to "help" me get started.

Dim fField As Field

sDatabase = "filename"
Set daoDB = OpenDatabase(sDatabase)
Set daoRS = daoDB.OpenRecordset("SELECT * FROM Transactions")

daoRS.MoveFirst
While Not daoRS.EOF
'Some Function
MsgBox daoRS.Fields(0).Value
MsgBox daoRS.Fields(1).Value
MsgBox daoRS.Fields(2).Value
MsgBox daoRS.Fields(3).Value
MsgBox daoRS.Fields(4).Value
MsgBox daoRS.Fields(5).Value
MsgBox daoRS.Fields(6).Value
MsgBox daoRS.Fields(7).Value
MsgBox daoRS.Fields(8).Value
MsgBox daoRS.Fields(9).Value
MsgBox daoRS.Fields(10).Value
MsgBox daoRS.Fields(11).Value

daoRS.MoveNext
Wend


All this does is move through each value of the table through a message box. What I need to do is have each field export to text file as it is displayed in the message box. Or, just export in general, but this was given to me by one of our coders for a little help. It's not helping much, heh. Thanks for the help

Reply With Quote
  #17  
Old July 28th, 2003, 10:11 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
Okay. Referring to the code sample I posted, what errors did you recieve when you attemtpted to run that? Once you have the connection you will be able to perform you data population.
...
Your issue is connecting to the database correct?

Reply With Quote
  #18  
Old July 29th, 2003, 06:46 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I actually got this to work now. I now need to print individual fields to file. I've been searching the net for weeks looking for an example of how to do this, but no luck.

Reply With Quote
  #19  
Old July 30th, 2003, 12:42 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
Are you wanting to print to the filesystem?
PHP Code:
 Open "readme.txt" For Append As #1
Print #1, "Some information here "
Print #1, vbNewLine
Close #1 
__________________
El éxito consiste en una serie de pequeñas victorias día a día

MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Access/VBA noob question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT