Solved

How do i Search for  record ?

Posted on 1998-11-30
4
159 Views
Last Modified: 2010-05-03
Hi
I am using VB3 and access 2
How do i search for a record ?
Thanx
Craig
0
Comment
Question by:CraigLazar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
dm_14 earned 30 total points
ID: 1447388
Three Methods available :
1. Create a recordset from a SQL Statement with a where clause which specifies your search criteria
2. Create a recordset of all the necessary data and search through the recordset using the FindFirst, FindNext, FindPrevious and FindLast Methods
3. Create a table object and use the Seek method (the table must have and index to do this)

Demo code of the above is available in the VB3 help file
0
 
LVL 4

Author Comment

by:CraigLazar
ID: 1447389
Hi
VB3 does not allow me to do this
dim rs as recordset
set rs = db.opnerecordset("Select * from log",dbopendynaset)

gives me an error on line one saying rs is type not defined
0
 

Expert Comment

by:hatina
ID: 1447390
Im not sure , if  VB3  support object Recordset and
constant dbOpenDynaset.  (maybe it's from VB4 or VB5)
Try :
Dim rs as Dynaset
set rs = db.CreateDynaset("Select * from log")

0
 
LVL 2

Expert Comment

by:dm_14
ID: 1447391
You can try creating a recordset! Its been a while since I used VB3, but I a am sure you can do this.

Alternatively, try creating a snapshot. You can even create a Query in Access 2 with your search critiera and create a snapshot of it from VB3 by just specifying the querydef - this is certainly possible. If you can wait for a while I will try to look for some code that demonstrates this (it should all be in the VB3 Help File)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question