Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prompt Report (2003)

    I trying to construct a prompt report. The prompt would involve 2 fields. The fields are Client manager and the other field is ASM. If it is the ASM number, I want to pull from the ASM field and pull those records. If it is a Client Manager number, I want to pull from the Client Manager field and bring up those records. Is this at all possible? I want a prompt to appear that says enter your code number and if it is an ASM enter that code, if Client Manager enter that code. Where would I put this prompt - which field?

    I have another prompt question - I have a prompt - Like [Enter District Number or Enter for ALL ] & "*" . The problem is the field has numbers like 1, 11, 18 etc. If I put a 1 in, I get 11 and 18 etc. I know it is because of the Like but I want them to be able to press enter to get the whole report. Is there a way around this. Sorry for the dual questions.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt Report (2003)

    1) I'd create a form with a text box in which the user can enter a number (or perhaps a combo box from which the user can select).
    Also place a command button on the form to open the report. In the code behind the command button, determine what kind of number the user entered, and specify a WhereCondition accordingly.

    2) Try this in the Criteria line:

    [Enter District Number or Enter for ALL ] Or [Enter District Number or Enter for ALL ] Is Null

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt Report (2003)

    I am not sure how to do number 1. Isn't there a way in the query I can put a prompt in Client Manager that says [Enter Client Mgr number or enter if ASM] and then the prompt in the ASM field can open?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt Report (2003)

    You can create parameters (prompts) for two fields in a query, but a form is more user-friendly.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt Report (2003)

    I am back and this time I think I should go with the form for my prompts. I need step by step directions if that is possible. I have to have two prompts. The first prompt is Employee Number. Then I need a prompt with Rep Number. They put in their employee id first and then their rep number. In the query I think I should put the following in the criteria =forms![formname]![controlname]. How do I do this for two prompts. What should the code be for the form, button on the form to run report etc.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt Report (2003)

    Do you want the users to type in the employee number and rep number, or do you have a table that lists all employee numbers and a table that lists all rep numbers? If so, you could provide combo boxes (dropdown lists) from which the user can select them. This reduces the probability of mistakes.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt Report (2003)

    This is a little bit of security for running the ultimate report. They should know their Employee Id and their rep no so no one else can run their report. I am thinking I have this form that has two text boxes to enter each parameter and then that =forms![formname]![controlname] for the criteria in the query for each field. Then have a button on the form to run the report. Is this all I need or am I way off.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt Report (2003)

    Your description sounds OK. Go for it.

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt Report (2003)

    It seems to work but how do I clear the numbers so that the next time the form is open the text boxes are blank?

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt Report (2003)

    If the user closes the form, the text boxes will be blank next time. (The text boxes should not be bound to a field)

  11. #11
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt Report (2003)

    Thanks for your help. You are correct....

Posting Permissions

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