Keep getting .NoMatch!

D

David Habercom

The help I found here has much improved my prospects for making this form do
what I need, but this code fails to find the record, though it runs. It runs
from VBA, and MchDonANDI is a field in the form's RecordSource query. Where
should I start looking for my (next) flaw?

Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
With rst
..FindFirst "[MchDonANDI]= '1204749'"
End With

Thanks in advance
 
W

Wayne-in-Manchester

Private Sub UseRealFieldName_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[MchDonANDI] = " & Str(Me![MchDonANDI])
Me.Bookmark = rs.Bookmark
End Sub


Try this on the AfterUpdate on your text box (UseRealFieldName), hope it helps
 
W

Wayne-in-Manchester

OOOPS - sorry

Private Sub UseRealFieldName_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[UseRealFieldName] = " & Str(Me![UseRealFieldName])
Me.Bookmark = rs.Bookmark
End Sub
 
W

Wayne-in-Manchester

Sorry about this - it's late and I'm a bit stupid at this time of night.


Private Sub UseRealFieldName_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[MchDonANDI] = " & Str(Me![UseRealFieldName])
Me.Bookmark = rs.Bookmark
End Sub
 
D

dbahooker

DAO is crap don't listen to these idiots.

MDB files are obsolete; wake up and smell the coffee kid
 
T

Terry Kreft

From this and other posts I suspect you're just a troll, but there is the
possibilty that you're actually incompetent and prefer to blame the tool.
 
Top