Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Dec 2003
    Posts
    42

    Unanswered: Printing mailing labels for specific customers...

    Hi,

    I was wondering if someone could help me! If so, I would be extremely grateful!

    I have created a table called Themes and this table has a field called ThemeID. This is simply an AutoNumber field, and has a corresponding theme name, i.e. 1 = South Africa.

    Now, there is also a field called ThemePreference contained in a Customers table. This contains a number, which is based upon those taken from the Themes table. I have created mailing labels using the Report Wizard, and what I want to be able to do is to click a print button on a form and then get asked for a value, e.g. 1, into a text box on a form, and for mailing labels to be printed out for every customer who has 1 (i.e. South Africa) as their theme preference.

    How is this achieved? I've basically done it all apart from creating the button…

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Put "WHERE themeid = [enter theme number]" into the sql statement used to generate the labels.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2003
    Posts
    42
    I still don't understand! Sorry! What SQL statement? I didn't write an SQL statement...

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    o rly?

    How did you create the report?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Dec 2003
    Posts
    42
    I just selected 'Reports' and then used the Wizard and chose the 'Label' option!

  6. #6
    Join Date
    Dec 2003
    Posts
    42
    No other ideas then?

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You're not going to be able to do this with wizards.

    open your report in design view. select properties. Go to the data tab. Click the elipses next to the recordsource field. Switch to sql view. Add the code I gave you.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Dec 2003
    Posts
    42
    OK thanks mate. However, I've entered this code...

    SELECT from CUSTOMERS "WHERE ThemeID = [Please enter the theme number]"

    And it says...

    "The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect."

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Oh, remove the quotes. I should have been more specific, my bad.

    So it should look like this:

    SELECT * from CUSTOMERS WHERE ThemeID = [Please enter the theme number]
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    Dec 2003
    Posts
    42
    Thanks mate. Problem is, its still not working!

    I am double-clicking the report, and then it is asking to enter the ID number (as I wanted), so I enter 1, and then it asks again! I enter 1 again and then it just displays all of the customers on the report and not only those with a 1!

  11. #11
    Join Date
    Dec 2003
    Posts
    42
    Sorry, was my mistake, I have now sorted it! Thanks so much for your help!!!!

  12. #12
    Join Date
    Dec 2003
    Posts
    42
    Also...this may sound a very stupid question, but my friend made the forms from the Wizard, so I've had to go through all of the forms now and sort them out! As he used the Wizard, it has one of the background patterns set on the forms. I don't want these and just want to have a background colour, but when I change the background colour, it doesn't change - it won't change the standard wizard background pattern to a background colour!

  13. #13
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    So you are asking how to take out the background and replace it with a color?

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  14. #14
    Join Date
    Dec 2003
    Posts
    42
    Yeah, exactly!

  15. #15
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Hold on let me play around (create a wizard form and put one of the weird bg's in and then take it out). I will then give you a detailed explanation .

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

Posting Permissions

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