0

Hi I have a database of one table with headings as shown

DONOR COURSE TITLE START DATE END DATE MIN/DEPT ANNOUNCED TO DATE RECEIVED BY HRD DONOR DEADLINE DATE FORWARDED NOMINEES BENEFICIARIES-MALE BENEFICIARIES-FEMALE NUMBER ACCEPTED REASONS FOR NON-ACCEPTANCE DATE OF ENTRY NATIONAL COUNTY

The table is in access. I would like to have a search function that is able to give me results of one or more of the headings.

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by hkdani
0

You'll have to set up your program to use Active X Data Objects (ADO) : usually Microsoft Active X Data 2.X. You can use Data Access Objects (DAO). But ADO is more up to date. Not as fast. But more up to date. Do this in the References section of your IDE.

Then you have to declare and instantiate your Data Objects,

Dim rst as Recordset
Dim cn as Connection

'
Private Sub Form_Load()
     Dim strSequel as String
     ' Instantiate your objects
     strSequel = "Select TableName.Donor, TableName.Course FROM TableName WHERE TableName.Donor = 'George';"
     Set rst = new Recordset
     Set cn = New Connection

     With cn
          .Provider = "Name of your Data Provider"
          .Open   ' Fill in appropriate Values
     End With
     rst.Open "c:\Database Name.mdb", strSequel, "etc"       ' Fill in appropriate values.

End Sub

Edited by hkdani: n/a

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.