COMMUNICATING VB6 WITH ACCESS
-
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
-
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