Results 1 to 10 of 10

Thread: begins with

  1. #1
    Join Date
    Jul 2006
    Posts
    108

    Unanswered: begins with

    i have a list of upwards of 1000 venders in a table.

    i have them listed in a form (tabular)

    i have a text box above the form (in the header area)

    i want a user to be able to key in a couple of letters and it sorts the venders below in a begins with... filter

    ex:

    text box --> starts with boe

    then the records not starting with boe are sorted out.

    its probally right in front of my eyes but i cant seem to find it. can someone help me?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Wild Cards

    e.g.
    LIKE 'boe*'
    instead of
    = 'boe'

    ta da
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jul 2006
    Posts
    108
    ii input that code but it has to be like this right? Like "[[forms]![vender1]![begins]]*"

    my form is vender1
    and my field is begins


    shouldnt that work?
    Last edited by jwalker343; 07-27-06 at 16:06.

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    begins

    Like '" & Forms!vender1!begins & "'*'"

    i.e. Like (single quote)(double quote) & Forms!vendor1!begins & (double quote)(single quote) * (single quote)(double quote).

    Someone correct me if I'm wrong...been a while now since I've played with Access.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Depends where this being run.

    In a stored query:
    Code:
    ...WHERE MyCol Like Forms!vender1!begins & "*"
    In VB (inline SQL):
    Code:
    ...WHERE Like '" & Forms!vender1!begins & "*'"
    Code tags make the single quotes vs double quotes easier to spot.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    begins

    Thanks Pootle Flump. I'm getting rusty on my Access syntax since I'm now programming in 4GL
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I have no knowledge about 4GL but it sounds like you are unhappy. Assuming that there isn't a big\ well paying market out there for 4GL programmers I think you need to have one last push at work to get them to move on or start thinking about moving on yourself.

    Just my 0.02 BPS worth but it is a fast moving world in IT and you don't want to get left behind.

    I'm actively trying to get stuff onto my CV to supercede Access (got the SQL Server to a decent standard, working on .NET now).
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Jul 2006
    Posts
    108
    i still cannot get it to work, could someone please show me what it should look like

    ive attatched the DB im using to experiment with.
    Attached Files Attached Files

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    There y'are young fella.

    Now - why did you add in all those extra quotes?
    Attached Files Attached Files
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Jul 2006
    Posts
    108
    i have a book microsoft access 2000 bible, its 1200 pages of access, querys and everything it says that for the like operand to work and all its syntax must be:

    like "[ blah blah blah ]"

    but i think im gunna stop reading this book now.

    thank you VERY much, ive been working on this for 2 days!!!

Posting Permissions

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