Hello All -
Have any of you ever had an issue where your code will work on a double click Event, but not a single click event?
The code listed below is doing this to me and for the life of me I cannot figure it out! The error that I am getting is "Object Variable or With Block Variable Not Set" I have placed (ERROR OCCURS HERE) where the debugger brings me to.
I appreciate any feedback you can give.
Have any of you ever had an issue where your code will work on a double click Event, but not a single click event?
The code listed below is doing this to me and for the life of me I cannot figure it out! The error that I am getting is "Object Variable or With Block Variable Not Set" I have placed (ERROR OCCURS HERE) where the debugger brings me to.
I appreciate any feedback you can give.
PHP:
Dim db As DAO.Database
Set db = CurrentDb
Dim sql As String
Dim strschCode As String
Dim I As Integer
Dim rs As DAO.Recordset
Dim strBegin As String
Dim strEnd As String
Dim strRate As String
Me.lstFeeSchedule.RowSource = ""
For I = 0 To Me.lstDiscFeeSchedules.ListCount - 1
If Me.lstDiscFeeSchedules.Selected(I) Then
strschCode = Me.lstDiscFeeSchedules.VALUE
sql = "SELECT tblOSM_DiscSchedule.Disc_Sch_Code, tblOSM_DiscSchedule.Seq_id, tblOSM_DiscSchedule.Begin_Range, tblOSM_DiscSchedule.End_Range, tblOSM_DiscSchedule.Rate " & _
"FROM tblOSM_DiscSchedule " & _
"WHERE (((tblOSM_DiscSchedule.Disc_Sch_Code)='" & strschCode & "')) order by tblOSM_DiscSchedule.Seq_id asc;"
Set rs = db.OpenRecordset(sql)
End If
Next I
While Not rs.EOF (ERROR OCCURS HERE)
strBegin = ""
strEnd = ""
strRate = ""
strBegin = FormatCurrency(rs.Fields("Begin_Range"), "0")
strEnd = FormatCurrency(rs.Fields("end_Range"), "0")
strRate = FormatPercent(rs.Fields("rate"))
Me.lstSchedule.AddItem ("'" & strBegin & "';'" & strEnd & "';'" & strRate & "'")
rs.MoveNext
Wend
rs.Close
Set rs = Nothing