Solved

seeking in a data control DB

Posted on 1998-06-12
6
144 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
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to open Waze.com/livemap from address saved in DB? 26 206
MS Access Search and Replace Using VBA 6 80
Copy a row 12 63
Send outlook email from VBS Script 2 42
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

789 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