FireGeek21
Technical User
I am getting "Item Not Found in Collection" in this FORM_LOAD function. Can anyone see what the issue is? I've been looking at this far too long to see the issue.
Dim sql As String
Dim ItemName As String
Dim db As DAO.Database
Dim rs As Recordset
Dim x As Integer
ItemName = Me.lblRunType.Caption
Set db = CurrentDb
sql = "SELECT Max(LastRun.LastRun_DT), Max(LastRun.Parameter_DT), LastRun.ItemRun FROM LastRun WHERE ItemRun = '" & ItemName & "' GROUP BY LastRun.ItemRun"
Set rs = db.OpenRecordset(sql)
Me.lblLastRun.Caption = "Append Queries for Active Staff last run on " & rs!LastRun_DT & " with a parameter date of " & rs!Parameter_DT & "."
FireGeek
(currently using Crystal Reports XI with Lawson 9.01)
Dim sql As String
Dim ItemName As String
Dim db As DAO.Database
Dim rs As Recordset
Dim x As Integer
ItemName = Me.lblRunType.Caption
Set db = CurrentDb
sql = "SELECT Max(LastRun.LastRun_DT), Max(LastRun.Parameter_DT), LastRun.ItemRun FROM LastRun WHERE ItemRun = '" & ItemName & "' GROUP BY LastRun.ItemRun"
Set rs = db.OpenRecordset(sql)
Me.lblLastRun.Caption = "Append Queries for Active Staff last run on " & rs!LastRun_DT & " with a parameter date of " & rs!Parameter_DT & "."
FireGeek
(currently using Crystal Reports XI with Lawson 9.01)