Prev: DateDiff Error
Next: If field then checkbox and enable
From: RicDon on 27 May 2010 17:52 I want to prompt the user for a value to use to filter a form. Here is my command with the WhereCondition: docmd.OpenForm "test", acNormal, , "LastName=[Enter a Last Name]" I want to use the WhereCondition as a "LIKE" criteria. Variations on the WhereCondition itself that I've tried include various combinations of LastName LIKE %...% LastName LIKE *...* LastName LIKE [%...%] LastName LIKE [*...*] You get the idea... No luck so far. Any thoughts?
From: John W. Vinson on 27 May 2010 21:09 On Thu, 27 May 2010 21:52:50 GMT, "RicDon" <u60397(a)uwe> wrote: >I want to prompt the user for a value to use to filter a form. Here is my >command with the WhereCondition: > >docmd.OpenForm "test", acNormal, , "LastName=[Enter a Last Name]" > >I want to use the WhereCondition as a "LIKE" criteria. Variations on the >WhereCondition itself that I've tried include various combinations of > >LastName LIKE %...% >LastName LIKE *...* >LastName LIKE [%...%] >LastName LIKE [*...*] > >You get the idea... > >No luck so far. Any thoughts? LastName LIKE "*" & [Enter a last name, or part of one:] & "*" -- John W. Vinson [MVP]
From: Dirk Goldgar on 27 May 2010 21:14 "RicDon" <u60397(a)uwe> wrote in message news:a8a6128a88ad8(a)uwe... >I want to prompt the user for a value to use to filter a form. Here is my > command with the WhereCondition: > > docmd.OpenForm "test", acNormal, , "LastName=[Enter a Last Name]" > > I want to use the WhereCondition as a "LIKE" criteria. Variations on the > WhereCondition itself that I've tried include various combinations of > > LastName LIKE %...% > LastName LIKE *...* > LastName LIKE [%...%] > LastName LIKE [*...*] > > You get the idea... > > No luck so far. Any thoughts? Try: Docmd.OpenForm "test", acNormal, _ WhereCondition:="LastName Like '*' & [Enter a Last Name] & '*'" -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
|
Pages: 1 Prev: DateDiff Error Next: If field then checkbox and enable |