Results 1 to 5 of 5
  1. #1
    boy3696 is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    3

    Example Needed for Access VB

    Hi Everyone:
    I'm wondering if anyone has a simple example of vb code in Access 2007 that reads a query and outputs to a text file. I actually have 2 tables shown below which should be self explanatory.
    I need to do this to build html pages with tags and all, which is why I want to output to a txt format. I used Mail Merge for 5 different types of static pages already which works great, but now I have to generate HTML with entries underneath the main info (ie: repeated lines or iterate)...

    ie: Tabel names: AlbumsMaster & AlbumsTracks

    Album Name: xxxxxxxx
    Album Release: Date: xxxx-xx-xx
    Album Country: xxxxxxxxxxxx

    Tracks:
    1. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx
    2. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx
    3. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx
    4. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx
    5. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx


    .
    .
    .
    14. xxxxxxxxxxxxxxxxx by: xxxxxxxxxxxxxxxxx

    I would greatly appreciate it if someone could help me out.
    Thanking you in advance.
    D.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    have you ever considered establishing a DSN and simply displaying your Access tables on your webpages AS IS?

  3. #3
    boy3696 is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    3
    Hi Adam:
    I'm doing this for a friend and he doesn't want the information posted like a table.
    He basically wants the master information to show above, then the tracks from the track table to follow. That's why I need to see an example of how to read a query, loop through it and output to text. He gave me the format it has to be in, but my vb skills suck.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    post an image of the format of how it should look. compare it to what you've tried.

    Also, have you explored the output formats of right clicking on a query and outputting that way? To text? Have you tried the docmd.transfertext method in vb to see how it outputs as well? Give those a whirl and see how you make out with them.

    Which html editor are you using? I use DW and I know that it can format data a few different ways as well. If you're using something simple like WYSWYG though, I don't know if those kind of programs have the capabilities that sophisticated ones like DW have.

  5. #5
    boy3696 is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    3

    Resolved

    Thanks to everyone who looked at this.
    I figured out how to read a table, then output to text file.
    Everything is working as planned.
    Cheers.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Ms Access Programers Needed
    By Dinjee in forum Access
    Replies: 0
    Last Post: 01-29-2010, 07:08 PM
  2. Help needed...
    By Pazz in forum Access
    Replies: 0
    Last Post: 11-02-2009, 06:59 PM
  3. Replies: 0
    Last Post: 09-07-2009, 04:27 PM
  4. Replies: 4
    Last Post: 08-30-2009, 12:31 PM
  5. Access Professional Support Needed
    By Perry Mason in forum Access
    Replies: 0
    Last Post: 07-28-2009, 02:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums