How do I say Loop Until I get to last record, I want to loop thru the records copying and pasting in to other app and stop when it gets to the last record
I have this
Dim stAppName As String
Dim lngRetval As Long
Dim dblRandomVariable As Double
dblRandomVariable = Shell(stAppName, 1)
stAppName = "C:\Documents and Settings\023Q\Desktop\MASLine.exe"
Do
Forms![frmClaimHead-Line_RR]![frmMASline_RR subform].SetFocus
DoCmd.GoToControl "claimline"
DoCmd.RunCommand acCmdCopy
Call dblRandomVariable
DoCmd.GoToRecord , , acNext
'Call ClearClipboard
Loop Until lastrecord
I have this
Dim stAppName As String
Dim lngRetval As Long
Dim dblRandomVariable As Double
dblRandomVariable = Shell(stAppName, 1)
stAppName = "C:\Documents and Settings\023Q\Desktop\MASLine.exe"
Do
Forms![frmClaimHead-Line_RR]![frmMASline_RR subform].SetFocus
DoCmd.GoToControl "claimline"
DoCmd.RunCommand acCmdCopy
Call dblRandomVariable
DoCmd.GoToRecord , , acNext
'Call ClearClipboard
Loop Until lastrecord