Hi,
Can anyone tell me what is wrong with this Code.
Private Sub cmdFwdAllOutlets_Click()
Dim dbs As DAO.Database
Set dbs = CurrentDb()
Dim rs As Recordset
Dim RowCt As Long
Set rs = dbs.OpenRecordset("SELECT * FROM RK1-NotFwdedToMaster_query6")
Set RowCt = rs.RecordCount
DoCmd.RunMacro "RK1-Step1"
DoCmd.RunMacro "RK1-Step2"
'Set QryCount = dbs.OpenRecordset("SELECT count(*) FROM " & " RK1-PCEA_Master")
Do While (RowCt < 1)
DoCmd.RunMacro "RK1-Step2"
Set rs = dbs.OpenRecordset("SELECT count(*) FROM RK1-NotFwdedToMaster_query6")
Set RowCt = rs.RecordCount
Loop
rs.Close
dbs.Close
End Sub
Thanks
Ravi
Can anyone tell me what is wrong with this Code.
Private Sub cmdFwdAllOutlets_Click()
Dim dbs As DAO.Database
Set dbs = CurrentDb()
Dim rs As Recordset
Dim RowCt As Long
Set rs = dbs.OpenRecordset("SELECT * FROM RK1-NotFwdedToMaster_query6")
Set RowCt = rs.RecordCount
DoCmd.RunMacro "RK1-Step1"
DoCmd.RunMacro "RK1-Step2"
'Set QryCount = dbs.OpenRecordset("SELECT count(*) FROM " & " RK1-PCEA_Master")
Do While (RowCt < 1)
DoCmd.RunMacro "RK1-Step2"
Set rs = dbs.OpenRecordset("SELECT count(*) FROM RK1-NotFwdedToMaster_query6")
Set RowCt = rs.RecordCount
Loop
rs.Close
dbs.Close
End Sub
Thanks
Ravi