Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    11

    Unanswered: You cancelled the previous...

    I am getting a message that states you have cancelled the previous operation on the following code. The runtime error hits on FilterON = True line. This only happens when I choose DATE from my drop down list. My filter is based on the value I choose in the drop down list.

    Case "Date"
    Combo25.RowSource = "Select distinct LOAD_RPT_DATE from load_rpt_YES"
    ColName.Value = "LOAD_RPT_DATE"
    Case "Pub ID"
    Combo25.RowSource = "Select distinct PUB_ID from load_rpt_YES"
    ColName.Value = "PUB_ID"
    End Select
    End Sub

    Private Sub Combo25_AfterUpdate()

    Filter = " " & ColName & " = '" & Me.Combo25.Value & "' "
    FilterOn = True

  2. #2
    Join Date
    Jun 2004
    Location
    Saratoga Springs
    Posts
    24
    Try adding #s around any variable that is a date datatype instead of quotes or single quotes. For example

    var_date = #7/23/04#
    var_string = "this is a string"
    var_number = 0


    you may need to add a case statement to Private Sub Combo25_AfterUpdate....


    case date
    Filter = " " & ColName & " = #" & Me.Combo25.Value & "# "

    case string
    Filter = " " & ColName & " = '" & Me.Combo25.Value & "' "

    case number
    Filter = " " & ColName & " = " & Me.Combo25.Value & " "


    hope this helps
    Last edited by santiago_jon; 07-16-04 at 02:19.

  3. #3
    Join Date
    Jun 2004
    Posts
    11
    Works Great!!

    Thank you!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •