Probleum in printing the value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • progvar
    New Member
    • Feb 2008
    • 40

    Probleum in printing the value

    Hi!
    i have a query and i want to print the value of this query by programing. I use this query in ms-access and works fine but when i execute this query in visual basic it does't produce any error but no value is printed. Please provide the help

    Set dbMn = Workspaces(0).O penDatabase(txt path)

    Set RSmn = dbMn.OpenRecord set("SELECT UDAC, count(*) AS RCOUNT

    from " & txttable & " GROUP BY UDAC ORDER BY UDAC")

    txtpth = "D:\back_fastli nk221\demo softwares\DEMO\ REPORT.XLS"

    Open txtpth For Output As #1

    Print #1, UDAC, RCOUNT
  • mafaisal
    New Member
    • Sep 2007
    • 142

    #2
    Hello
    Try This

    Code:
    Print #1, RSmn!UDAC ;tab(10);RSmn! RCOUNT
    Here u Forgot use of recordset

    Faisal


    Originally posted by progvar
    Hi!
    i have a query and i want to print the value of this query by programing. I use this query in ms-access and works fine but when i execute this query in visual basic it does't produce any error but no value is printed. Please provide the help

    Set dbMn = Workspaces(0).O penDatabase(txt path)

    Set RSmn = dbMn.OpenRecord set("SELECT UDAC, count(*) AS RCOUNT

    from " & txttable & " GROUP BY UDAC ORDER BY UDAC")

    txtpth = "D:\back_fastli nk221\demo softwares\DEMO\ REPORT.XLS"

    Open txtpth For Output As #1

    Print #1, UDAC, RCOUNT

    Comment

    • progvar
      New Member
      • Feb 2008
      • 40

      #3
      Hi!
      THANKS IT WORKS


      VARINDER


      Originally posted by mafaisal
      Hello
      Try This

      Code:
      Print #1, RSmn!UDAC ;tab(10);RSmn! RCOUNT
      Here u Forgot use of recordset

      Faisal

      Comment

      Working...