DAO: FindFirst Problem

DAO: FindFirst Problem

Post by Garr » Wed, 23 Dec 1998 04:00:00


How can I use a wildcard * in setting the criteria?

To be more specific, I have a field called ItemCode which
contains for example, 001A. But I would like to match
only the 001, without the the character 'A' , to a variable.

So, I thought I would write this way:
rs.FindFirst " ItemCode = ' " & txtItemCode & " * ' "

But it wouldn't work. Can anyone please help?
Thank you very much.



1. problems using DAO FindFirst from outllook

I want to find a record within a RecordSet using DAO but the following codes
generates an error message

Public Sub test()
    Dim daoApp As DAO.DBEngine
    Dim dbsales As DAO.Database
    Dim franchisees As DAO.Recordset
    Dim i As Integer

    Set daoApp = New DAO.DBEngine

    Set dbsales = daoApp.OpenDatabase("C:\My
    Set franchisees = dbsales.OpenRecordset("franchisees")

    franchisees.FindFirst "name='Fred Bloggs'"

    Set dbsales = Nothing
    Set daoApp = Nothing

End Sub

The RecordSet is opened as I can use MoveNext and look at the records but
the line...

    franchisees.FindFirst "name='Fred Bloggs'"

generates an error message

Run-time error '3251'
Operation is not supported for this type of object

If anyone can shed light on this problems I'd be very appreciative

Best regards

Phil Cunningham

2. 16bit BDE problem

3. FindFirst in DAO


5. DAO - Findfirst criteria

6. Slow screen redraws with VT220/FTP

7. ADO find method compare with DAO findfirst method...

8. Configuration Management Analyst Position-Louisville, CO

9. DAO FindFirst/FindNext question???

10. ADO substitute for DAO FindFirst

11. Searching with ADO (What is the equivalent of the DAO FindFirst method)

12. DAO - FindFirst criteria

13. Q: DAO FindFirst crashes KERNEL32 (undocumented restrictions?)