Help Procedure

sysop470

Registered User.
Local time
Today, 05:38
Joined
Mar 25, 2005
Messages
87
I have this porcedure after update to get the next REQNO. Its working fine but after reaching the 1000 reqno it became slower to get the next number. Can someone help me to fasten the process??

Thanks


Dim rst As dao.Recordset
Dim intCnt As Long
Set rst = CurrentDb().OpenRecordset("stock", dbOpenDynaset)

For intCnt = 1 To 5000
rst.FindFirst "[reqno]=" & intCnt
If rst.NoMatch Then
Me.ReqNo = intCnt
DoCmd.RunCommand acCmdSaveRecord

Exit Sub
End If

Next
End Sub
 
Where do you have the current code and why are you saving the record?
 

Users who are viewing this thread

Back
Top Bottom