Results 1 to 5 of 5
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Alpha Search help

    The code below works fine but I want to use a textbox (called AlphaLetter) in place of the single letter ("S") to allow the ability to change the choice without changing the code.



    Neither of these options work and I am trying to wrap my head around the solution.

    WHERE (Title) Like "'" AlphaLetter* "'";


    WHERE (Title) LIKE '" Me.AlphaLetter & "*';"

    Code:
    MovieListBox.RowSource = " SELECT [MovieID], [Title], [YearReleased], [Category], FROM MovieListQ WHERE (Title) Like 'S*';"
    Thanks
    Jim O

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Try

    WHERE (Title) LIKE '" & Me.AlphaLetter & "*';"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    MovieListBox.RowSource = "SELECT [MovieID], [Title], [YearReleased], [Category], FROM MovieListQ WHERE Title Like '" & alphaletter & "*'"

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    The query must have the full path to the textbox ...

    select * from table where title like forms!myForm!txtbox & '*'

    But a filter only needs the me.txtbox

  5. #5
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    Thank you all very much.

    Jim O

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Alpha Split
    By Ekhart in forum Queries
    Replies: 6
    Last Post: 07-26-2016, 02:50 AM
  2. Search form fields in alpha order
    By snowboarder234 in forum Forms
    Replies: 1
    Last Post: 11-02-2012, 12:03 PM
  3. Alpha Numeric auto id?
    By arshadmgic in forum Forms
    Replies: 7
    Last Post: 09-02-2012, 03:00 AM
  4. Report in alpha order
    By khartoum in forum Reports
    Replies: 12
    Last Post: 03-27-2012, 09:01 AM
  5. Acess vs Alpha Five
    By afc in forum Access
    Replies: 5
    Last Post: 03-20-2012, 11:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums