Results 1 to 5 of 5

Thread: access form

  1. #1
    Join Date
    Jan 2008
    Posts
    13

    Unanswered: access form

    I use a combox to make a search criteria
    how do I use this criteria search my main data table (inventory)?
    and how do I show the result ?

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    have a browse thru the code bank sticky-post at the top of this forum. there are at least five demos of searching there.

    one of my old demos is here, but check the 'bank for other approaches to the problem.

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Jan 2008
    Posts
    13
    thank you
    let me try few of those

  4. #4
    Join Date
    Jan 2008
    Posts
    13
    If Len(Nz(Me.tbxName, "")) This Part I was confuseing
    If I want to Search By both First name and Last Name How should I do it ?
    Do I need two Text Box ?
    at '%' '*" what is the different ? isn't they the same ?
    Thank You

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    if that's my old demo, it has no idea which of the several possible criteria the user might/not have entered, so it is checking if there is anything in the tbxName textbox.
    nz() function is in help (and is not necessary)
    len() function is in help
    len(nz()) is both together: len() of whatever nz() returns

    if i was rewriting that line today i would probably use
    if lenb(me.tbxName) > 0

    see the next line of the code in the demo (after a few comment lines): it looks for tbxName (sub)string in both first & last name fields.

    stick with * as wildcard- it's the default unless you are doing something you haven't mentioned yet.

    anyway - look at the other examples in the 'bank: my old demo is embarrassingly primitive. there are simpler demos in the 'bank without the multiple-criteria & JOIN complications.

    izy
    currently using SS 2008R2

Posting Permissions

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