Solved

seeking in a data control DB

Posted on 1998-06-12
6
148 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
[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
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1463194
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
ID: 1463195
This command gives me error 3251 "Feature not available."  Any other suggestions?

0
 
LVL 6

Expert Comment

by:clifABB
ID: 1463196
Change the RecordsetType on your Data Control from 0 - Table to 1 - Dynaset
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:BoB
ID: 1463197
Bingo!
0
 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
ID: 1463198
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
ID: 1463199
Thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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