Solved

seeking in a data control DB

Posted on 1998-06-12
6
135 Views
Last Modified: 2012-05-04
I am using VB 4 to make a front end for an Excel database.  The front end is read only and the user is allowed to scroll through the entries and search for particular fields.  I am using a data control and binding labels to the appropriate fields.  How can I allow the user to search for X in fieldY?
0
Comment
Question by:BoB
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
If X is a numeric value:
Data1.Recordset.FindFirst "fieldY = X"
If X is a text value:
Data1.Recordset.FindFirst "fieldY = 'X'"
0
 

Author Comment

by:BoB
Comment Utility
This command gives me error 3251 "Feature not available."  Any other suggestions?

0
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
Change the RecordsetType on your Data Control from 0 - Table to 1 - Dynaset
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:BoB
Comment Utility
Bingo!
0
 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
Comment Utility
Let's see...
Name of a dog in children's songs.  :)

I will assume I can resubmit for points.

If X is a numeric value:
Data1.Recordset.FindFirst "fieldY = X"
If X is a text value:
Data1.Recordset.FindFirst "fieldY = 'X'"

Change the RecordsetType on your Data Control from 0 - Table to 1 - Dynaset
0
 

Author Comment

by:BoB
Comment Utility
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now