Re: how to do an SQL statment using ADODC1

From: Gérard Leclercq (gerard.leclercq_at_pas-de-mail.fr)
Date: 02/26/05

  • Next message: dimension: "Access Database, Autogenerated code"
    Date: Sat, 26 Feb 2005 11:03:35 GMT
    
    

    Exact match
    Adodc1.recordSource="SELECT * FROM table1 WHERE last_nm ='" & strLastName &
    "' ORDER BY last_nm"
    Adodc1.Refresh

    All names starting with
    Adodc1.recordSource="SELECT * FROM table1 WHERE last_nm LIKE '" &
    strLastName & "%' ORDER BY last_nm"
    Adodc1.Refresh

    All names with the string
    Adodc1.recordSource="SELECT * FROM table1 WHERE last_nm LIKE '%" &
    strLastName & "%' ORDER BY last_nm"
    Adodc1.Refresh

    In some cases you need to change % in *


  • Next message: dimension: "Access Database, Autogenerated code"