Issue with find first

ozdemirozgur

Registered User.
Local time
Today, 10:00
Joined
Apr 29, 2011
Messages
47
Hi,

I am geeting "loop without do" error message for the code below which looks like right. please can you help

Dim myDb As Database, MySet As Recordset, MySet1 As Recordset
Set myDb = CurrentDb()
Set MySet = myDb.OpenRecordset("Table1", dbOpenTable)
Set MySet1 = myDb.OpenRecordset("Table2", dbOpenTable)
Do While Not MySet.EOF

With MySet1
.FindFirst "Name=MySet1.Name"

MsgBox "MySet1 kayit"
MsgBox MySet!Name
MsgBox MySet1!Name

MySet1.Edit
MySet1!okul = MySet!Name
MySet1.Update

MySet.MoveNext
Loop
End Sub
 
You didn't end the With.
 
Hi thanks,

how I will end with the "With" /

regards,
 
From VBA help:

End With
 

Users who are viewing this thread

Back
Top Bottom