Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2007

    Unanswered: Form to have report like capabilities

    Hi there,

    Using Access 2003 on XP

    You know how when you make reports, it allows you to organize the data by a certain field and all the other data follows after?



    Name|Action Item|Requirement|Complete

    John|Check item|Get it done|False
    Jane|Get item|Buy it|False
    John|Get item|Later on|False

    and the report will come out as

    Check Item, Get it done, False
    Get item, Later on, False

    Get item
    Buy it


    So I'm wondering if it's possible to do that for a form?

    Any kind of help would be wonderful.

    Thanks =)

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    What you're describing sounds like "grouping", and in form terms, using a "subform".

    There are plenty of ways to achieve what you want, my personal favourite is to use a listbox to show multiple values.

    Create a form, with one textbox and one listbox - don't forget to give them sensible names!

    So here's the trick, set the rowsource of the listbox equal to the following
    "SELECT [Action Item], [Requirement], [Complete] FROM tableName WHERE [Name] = '" & Me.textboxName.Value & "'"
    Please note the highlighted apostrophes, they're key in this example.

    Now on the textbox KeyUp event place the following
    Give it a go and let me know how you get on (and whether this is something similar to what you were looking for)!

    Good luck!

    Note: You may wish to set the lisbox properties so that it can display 3 columns too!!
    Home | Blog

  3. #3
    Join Date
    Sep 2007
    Hi there,

    Thank you for your reponse!

    I tried using this in the listbox

    "SELECT [Action Item], [Requirement], [Complete] FROM Action WHERE [Name] = '" & Me.txtTest.Value & "'"

    But it gave me this error

    The Record Source ..... Does not exist

    So tried this as well

    "SELECT [Action Item], [Requirement], [Complete] FROM [Action] WHERE [Name] = '" & Me.txtTest.Value & "'"


    "SELECT [Action Item], [Requirement], [Complete] FROM "Action" WHERE [Name] = '" & Me.txtTest.Value & "'"

    But still to no avail ..

    Is there something wrong I'm doing? I checked the tables to make sure if the fields were correct, and they are.

    THanks again for your help!

  4. #4
    Join Date
    Sep 2007
    I got the syntax to finally work, but it really doesn't do anything.

    When I do the key-up function in Access, it's saying that a Me macro is missing...

    However when I hard-code the name to be a certain thing, I do get that information..

    My question is this

    what does Me.lstTest.Requery and ' "& Me.txtTest.Value & "' do exactly?

Posting Permissions

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