Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2004
    Posts
    173

    Unanswered: Report/Updates Based on Datasheet Selections

    I have a Datasheet with about 100 records. If I select 20 or so I would like to do 2 things

    1. Print a Report Based on the Selection

    Ex: Print a Report Listing only the Currently Selected Records

    2. Update a Field in All of the Selected Records

    Ex: lets say that 20 employees are assigned to a Department (Shoes)
    and I want to Update all 10 to (Clothing)

    or 20 Employees are at a Rate of $10hr and I want to Change all of them to $15hr - same principle as above


    I'd like to Select all 20, then click a button that will akk me to select the Dept to Update to (most likely a Dropdown), then when I select the Desired Dept, click OK and all will be Updated.

    Or if I wish to Update the Salary Field, do something similar..

    This is similar to a Fill Down in other languages

    Thanks - AB

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Hi there,

    In the beginning there were Tables. After the Tables man was instructed to create Queries for the purpose of extracting the data needed......ok, so much for that. You need to next Create a Query based on that Table FIRST.
    NEXT, you need to figure out just what Criteria will be used to Select which records you want.
    NEXT, you create a Report based on that Query just created. That Query will be used as the Reports RecordSource.
    After all that, we will take it from there....or someone else might just step in. But you really should get the basics done starting with the Query.

    have a nice one,
    BUD

  3. #3
    Join Date
    Aug 2004
    Posts
    173

    Thanks - But Not the Solution Needed

    Thanks for the reply - I am aware of hoew to do ths with a query.

    The issue is I need to perform the operations as described in order to fulfill a requirement designated by my employer.

    I remember seeing an example somewhere showing how to print a report based on the selected records of a datasheet - Can I find it now - NO! :-)

    AB


    Quote Originally Posted by Bud
    Hi there,

    In the beginning there were Tables. After the Tables man was instructed to create Queries for the purpose of extracting the data needed......ok, so much for that. You need to next Create a Query based on that Table FIRST.
    NEXT, you need to figure out just what Criteria will be used to Select which records you want.
    NEXT, you create a Report based on that Query just created. That Query will be used as the Reports RecordSource.
    After all that, we will take it from there....or someone else might just step in. But you really should get the basics done starting with the Query.

    have a nice one,
    BUD

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Elaborate on what you mean by datasheet, just to make sure we're talking about the same things here.

    Eg: A FORM in datasheet view is not the same as looking at a TABLE in design view, even though they are visually identicle.
    oh yeah... documentation... I have heard of that.

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

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Question

    Quote Originally Posted by Teddy
    Elaborate on what you mean by datasheet, just to make sure we're talking about the same things here.

    Eg: A FORM in datasheet view is not the same as looking at a TABLE in design view, even though they are visually identicle.
    Precisely, I thought from how it was stated that he meant a Table. Teddy, can you actually select a group of records in a Table and print a Report from them, and then Update all the select fields without the use of either a Query/SQL or VBA? I am here to learn more. I think I'm lost!

    BUD

  6. #6
    Join Date
    Aug 2004
    Posts
    173

    More Info - See Attached DB - Query on Selected Records

    Maybe more info can help. Here is what I need to do


    Select some records from a datasheet (sub-form on a form)

    then print a report based on that selection

    I have the selection part working, which puts the selected records in a textbox txtSelected


    then I want a report to print showing which records were selected

    Any help is appreciated

    Thanks - AB




    Quote Originally Posted by Bud
    Precisely, I thought from how it was stated that he meant a Table. Teddy, can you actually select a group of records in a Table and print a Report from them, and then Update all the select fields without the use of either a Query/SQL or VBA? I am here to learn more. I think I'm lost!

    BUD
    Attached Files Attached Files

  7. #7
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Couldn't open that one, can you save as Access 2000?

    BUD

  8. #8
    Join Date
    Aug 2004
    Posts
    173

    2000 Version

    Quote Originally Posted by Bud
    Couldn't open that one, can you save as Access 2000?

    BUD
    Here is a 2000 Version
    Attached Files Attached Files

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Can't d/l that file at work here, but put a reference to the textbox holding the records you want to filter on using: forms!yourForm!txtSelected

    Note that you will have to apply proper SQL syntax to the string. I would recommend using the "IN" statement: "where yourField IN (comma, deliminated, set, of, values)" That saves you a bit of confusion at the form level.
    oh yeah... documentation... I have heard of that.

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

Posting Permissions

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