Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80

    Unanswered: Pop-up form & query

    I've created a pop-up form and a parameter query. The idea was to create an easy way to search the database. Users shouldn't have to enter search criteria, they only have to enter the name (or part of it) in the pop-up form.

    Query has two text fields (first name, last name) and two combo boxes. Criteria for the text fields:

    Like [First name:] & "*"
    Like [Last name:] & "*"

    So it's supposed to prompt the user for one or more letters to search. It works fine, but I want to use the pop-up form to ask for those letters and send them to the query. How can I do it?

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Wink

    In the Query Criteria write

    like cString([Formulare]![F_urPopFormName]![urTxtBoxName]) & "*"



  3. #3
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80
    Thanks... I'll try it out

  4. #4
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80
    I got an error message saying: undefined function "cString"

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Talking

    Originally posted by hammbakka
    In the Query Criteria write

    like cString([Formulare]![F_urPopFormName]![urTxtBoxName]) & "*"


    Please Replace Formulare by Forms (Because the German forms has some other syntax)

    like cString([Forms]![F_urPopFormName]![urTxtBoxName]) & "*"



  6. #6
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80
    It's still giving me the same error message...

  7. #7
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by hammbakka
    Please Replace Formulare by Forms (Because the German forms has some other syntax)

    like cString([Forms]![F_urPopFormName]![urTxtBoxName]) & "*"


    Sorry it should be

    like cStr([Forms]![F_urPopFormName]![urTxtBoxName]) & "*"





  8. #8
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80
    Now the query works, but the form doesn't. When I run the form, I get an error message saying that the criteria is wrong or it's too complicated.

  9. #9
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    On the form there is a textbox (has no entry when u open the form) ok?
    then you can type in this textBox your Criteria and click the button to start the quary, there should not be error.

    Just type the criteria in the text box something like: Sh
    I mean without Astriks *

  10. #10
    Join Date
    Oct 2003
    Location
    Finland
    Posts
    80
    The form doesn't open... When I try to run the form, it opens the query (it prompts for criteria). I might have made a mistake somewhere, I'll try to fix it myself... thank you for your help

Posting Permissions

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