0

hi..
i'm using visual basic 2008. and ms access 2007.
i inserted check boxes in table to get many records at a time. i.e all checked records will be collected.
i have two problems. can you please give me solutions..

  1. how to write a query to meet 'check box is selected' condition
  2. how to collect many records(i.e all the checked records) at a time.

my vb is not supporting ADODB. is there any way to be supported by vb ?

many of my trials lead to numerous errors.. can anybody please help me...?

2
Contributors
1
Reply
12
Views
4 Years
Discussion Span
Last Post by srkv03
0

Hi babjitvk,

You can use DAO (add references to your project as Microsoft DAO 3.36 Object Library) and follow these steps
Dim dboSample as Database
Dim rsSample as Recordset
Dim strSQl as String

Set dboSample = Workspaces(0).OpenDatabase(ViewDatabase, False, False, vbNullString)

strSQL = "SELECT YourDBName.ColName FROM YourDBName where YourDBName.ColName = Yes;"
Set rsSample = dboSample.OpenRecordset(strSQl, dbOpenSnapshot)

rsSample has all the records which have the checkbox ticked.

Regards
Sr

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.