Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. COMMUNICATING VB6 WITH ACCESS

COMMUNICATING VB6 WITH ACCESS

Scheduled Pinned Locked Moved Visual Basic
databasequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I am trying to use Vb6 to count the number of records of a particular set of fields in Access.So i did the following:- 1) Inserted MSFlexGrid on the form. 2) added a data control to the same form. 3) Set the "DatabaseName" property of the Data control to the name of the database(in Access) from which i'm trying to count the records. 4) Set the "RecordSource" property of the Data control to the name of the table(in the database) from which i'm trying to count the records. 5)Hook up MSFlexGrid control to the data control. 6) Write a SQL statement to select the particular fields I'm Looking for. Say for instance a table that has fields FIELD1, FIELD2 and i want to list only FIELD1 at "run time".I write the appropriate SQL Statements. But when i run the code The MSFlexGrid shows all the Fields and not just the field i'm looking for. SO WHAT DO I DO TO LIST ONLY THE FIELD THAT I AM LOOKING FOR AT RUN TIME IN vb6???? Thanks a lot

    M 1 Reply Last reply
    0
    • L Lost User

      I am trying to use Vb6 to count the number of records of a particular set of fields in Access.So i did the following:- 1) Inserted MSFlexGrid on the form. 2) added a data control to the same form. 3) Set the "DatabaseName" property of the Data control to the name of the database(in Access) from which i'm trying to count the records. 4) Set the "RecordSource" property of the Data control to the name of the table(in the database) from which i'm trying to count the records. 5)Hook up MSFlexGrid control to the data control. 6) Write a SQL statement to select the particular fields I'm Looking for. Say for instance a table that has fields FIELD1, FIELD2 and i want to list only FIELD1 at "run time".I write the appropriate SQL Statements. But when i run the code The MSFlexGrid shows all the Fields and not just the field i'm looking for. SO WHAT DO I DO TO LIST ONLY THE FIELD THAT I AM LOOKING FOR AT RUN TIME IN vb6???? Thanks a lot

      M Offline
      M Offline
      markmyb
      wrote on last edited by
      #2

      Change the recordsource during runtime. you might have to modify your datacontrol to use sql statement instead of a table. Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups