Results 1 to 13 of 13
  1. #1
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86

    Choose a record from a query?


    Hi All,


    Here is what I want to do....maybe you can give me some advice or let me know if this is feasible.

    I have forms that the operator will fill out some of the controls and then close form....need to reopen form at a later date/time and complete other controls.

    So.....my plans are,

    -Build a query that will use "Is Null" to check for all of the incomplete fields.

    - Then I would like to present these records to the operator and allow them to choose one (there may be several partially completed records) and bring it back up in its original form.

    Any ideas? Can you "choose" a record somehow? Say for instance if the queried records came up in tabular view is there a way to choose an individual record thus opening that particular record in its own columnar view?

    (I know that the operator could just complete the remaining fields in the tabular view, but I would rather that they be able to choose the record and then enter data from the view that they would be more familiar with.)

    Hope this question is understandable.

    Thank You!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Does this work for you?

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    Paul,
    Thanks so much for the time you put in this forum!

    Your info was very helpful but I still am not sure if my underlying question is answered.

    What I want to do is choose an individual record from a list of records.

    Here is what would be perfect:

    A button on a form that when the operator pushes it will produce another form that lists all the incomplete records.....(I have figured out this far)

    Next, the operator will look at this list and say "ok, there is the incomplete record I need to finish filling out and "click" on that record which will bring up that particular record in its original form to complete. (This is the part I am having trouble with. How can I allow the operator to "click" on a record?


    Thank You,

    And Good Morning BTW, It's 6:30 am in Kodiak, Alaska!

    Kevin

  4. #4
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    Just had a thought......Can you create a list control that would include the records (from a query) that would list the incomplete records?

    If so, then the operator could choose the particular incomplete record they needed easily.

    Am I getting warm?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Queries have no events associated with them, so choosing from a query wouldn't really work. Other than that, I'm not sure what you're looking for. The link I posted would allow you to select a record from a list of records and bring it up on another form. You could be using a form as in my example, or a listbox would certainly work too. In a form you can use the click or double-click event of a textbox, with a listbox you could use its after update or click event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    OK, I still don't get it exactly

    Maybe we are talking about the same thing just saying it differently.


    Main Form - has ctl button that says "Edit Incomplete Records"

    this would open up a form that lists all the incomplete forms (could be up to 6-7 records)

    So with your wherecondition suggestion -

    Where SecondFormName is the name of the form being opened, FieldName is the field in that form's recordsource the restriction is based on, and ControlName is the name of the control on the current form that contains the value to be shown on the second form. As you will find throughout VBA, text and date values are treated differently.

    I am not sure of this part. What would restriction be? What value would be?

    Im sorry I am such a Newbie.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    I assume your records have a key field that can be used to identify a particular record. In the syntax of the wherecondition argument:

    "FieldName = " & Me.ControlName

    FieldName is the name of that key field. That field must be in the record source of the form being opened. ControlName is the name of the control (textbox, combo, etc) on the first form that contains the value you want the second form restricted to. Can you post your db?

    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    Thanks Paul, I appreciate it.

    I have attached a zip of my db. Please do not laugh. I never opened Access before 3 weeks ago!

    We are discussing the "Sterilization Menu":
    I currently have a "Add New BI Log" ctl button on the menu that opens "frmBIIncubation" in a new record.
    I want to add a "Edit Incomplete BI Log" ctl button that will do what we are talking about.....pull up the incomplete records and then allow the operator to choose a record to open in the form "frmBIIncubation" view.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    You mentioned that you had figured out how to get the form with incomplete records. Is that form in here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    No, not yet

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Well, I figured you would include that if you wanted me to make it work. Here's your db back, with a listbox on that form. If you select an item, it will open the other form to that record. I assume you will want to change the row source of that listbox to restrict to your incomplete items, and you may want to show different fields. I'm just demonstrating the method.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    Kevo is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Kodiak, Alaska
    Posts
    86
    Thank You so much Paul.

    I really appreciate your help.

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    No problem, post back if you have problems.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Choose Parameter combo box for report
    By RobRay in forum Reports
    Replies: 10
    Last Post: 08-10-2011, 02:48 PM
  2. Msg-box - choose teamnumber
    By carstenhdk in forum Reports
    Replies: 5
    Last Post: 05-31-2010, 01:32 PM
  3. Automatically choose which report?
    By Lockrin in forum Reports
    Replies: 2
    Last Post: 12-28-2009, 02:41 PM
  4. Replies: 3
    Last Post: 09-26-2009, 01:57 PM
  5. How do I choose multiple records for a report
    By admaldo in forum Reports
    Replies: 2
    Last Post: 03-03-2006, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums