Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    5

    Unanswered: Type Mismatch error

    Dear Sir/Madam
    I am trying to filter from a ADODC control where there are two fields to filter from two Combo controls. I have tried different variations of the below, but at the very least I get the Type Mismatch error:

    AdoUmpInfo.Recordset.Filter = "Umpire=' " + CStr(CboUmpNames.Text) + " ' " And AdoUmpInfo.Recordset.Filter = "Venue = '" + CStr(CboVenue.Text + "'")

    Yet strangely enough (for anyway) if I try a single filter, it works, thus:
    AdoUmpInfo.Recordset.Filter = "gamestatus='" + TxtFilter.Text + "' "

    Any suggestions on correcting this error would be extremely grateful.

    My home e-mail is peewee@bigpond.net.au

    Regards Peter Taylor

  2. #2
    Join Date
    Jul 2005
    Posts
    50
    Quote Originally Posted by PeterTaylor
    Dear Sir/Madam
    I am trying to filter from a ADODC control where there are two fields to filter from two Combo controls. I have tried different variations of the below, but at the very least I get the Type Mismatch error:

    AdoUmpInfo.Recordset.Filter = "Umpire=' " + CStr(CboUmpNames.Text) + " ' " And AdoUmpInfo.Recordset.Filter = "Venue = '" + CStr(CboVenue.Text + "'")

    Yet strangely enough (for anyway) if I try a single filter, it works, thus:
    AdoUmpInfo.Recordset.Filter = "gamestatus='" + TxtFilter.Text + "' "

    Any suggestions on correcting this error would be extremely grateful.

    My home e-mail is peewee@bigpond.net.au

    Regards Peter Taylor

    This generates a "Type Mismatch" error:

    AdoUmpInfo.Recordset.Filter = "Umpire=' " + CStr(CboUmpNames.Text) + " ' " And AdoUmpInfo.Recordset.Filter = "Venue = '" + CStr(CboVenue.Text + "'")

    Separately,

    AdoUmpInfo.Recordset.Filter = "Umpire=' " + CStr(CboUmpNames.Text) + " ' "

    or

    AdoUmpInfo.Recordset.Filter = "Venue = '" + CStr(CboVenue.Text + "'")

    should not generate any error.

Posting Permissions

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