b4rt07
searching for an answer
- Local time
- Today, 19:00
- Joined
- Sep 6, 2007
- Messages
- 9
Going loopy-ignore, have answer
Hi,
Can someone take a quick look and tell me where I have gone wrong, on compile message I am getting is 'Loop without Do'.
Cheers.
Hi,
Can someone take a quick look and tell me where I have gone wrong, on compile message I am getting is 'Loop without Do'.
Code:
Dim qdef As QueryDef
Dim db As Database
Set db = CurrentDb
Dim rsProcObjects As Recordset
Set rsProcObjects = db.OpenRecordset("select * from [qProcSelected]")
Do While Not rsProcObjects.EOF
'CYCLE
'If is run query only
If IsNull(rsProcObjects![ProcessObjectFilePath]) Then
xProcessStr = "Run query-" & rsProcObjects![ProcessObjectName] '&"-"&
Track_Process_Success xProcessStr
'action
DoCmd.OpenQuery "rsProcObjects![ProcessObjectName]"
xProcessStr = "Query-" & rsProcObjects![ProcessObjectName] & "-Run"
Track_Process_Success xProcessStr
'if is export file
ElseIf Not IsNull(rsProcObjects![ProcessObjectFilePath]) Then
xProcessStr = "Export file to-" & rsProcObjects![ProcessObjectFilePath] & rsProcObjects![ProcessObjectFileNm] '&"-"&
Track_Process_Success xProcessStr
'action
DoCmd.TransferText acExportDelim, , rsProcObjects![ProcessObjectName], Format(rsProcObjects![ProcessObjectFilePath] & rsProcObjects![ProcessObjectFileNm], "@"), True, ""
xProcessStr = "Export file to-" & rsProcObjects![ProcessObjectFilePath] & rsProcObjects![ProcessObjectFileNm] & "-Completed"
Track_Process_Success xProcessStr
rsProcObjects.MoveNext
Loop
Cheers.
Last edited: