Displaying the next action on a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • viperRider
    New Member
    • Jan 2008
    • 9

    Displaying the next action on a form

    So, I'm not a total newbie, but I am stuck with this one. I have a database built up for my homebrewing operation. Each batch i make has steps like any recipe does, but these steps all have dates when they need to be done. When i open the databse, it shows me what i have fermenting on the rack (via a simple query - and i would like it to show me what "step" is coming up next. I have a separate table for these steps; with a number field - relationship back to the master table (the batch number), a date field, a text field for what the step is and a check box for me to check when i have completed this step.

    I guess what i am looking for is a little help with the query; since i know how to show the data once i get it filtered out. I need a query that will show me the next step to be done; or one that has not been done and is overdue.

    Any help would be greatly appreciated!
    Edit: I am using Access 2003
    Last edited by viperRider; Aug 18 '08, 03:03 PM. Reason: Add OS
  • Lokean
    New Member
    • Apr 2007
    • 71

    #2
    select top(1) from (whateveryouhav e)
    where checkedfieldval ue = 0


    or something like that.

    Comment

    • viperRider
      New Member
      • Jan 2008
      • 9

      #3
      lol - i just had an idea like that - i only need the first unchecked record.

      now i have a problem trying to display that record. on my opening form, i have it set to continuous and it pulls the record from a simple query looking for 2 fields to be false - meaning this batch is still fermenting.

      i tried putting in a text box - but am having a little trouble merging the info you gavce me and trying to get it to work. how to i reference this query in that text box?

      Comment

      • viperRider
        New Member
        • Jan 2008
        • 9

        #4
        OK, I have been playing with this top 1 thing and have come to the realization that I do not know how to reference the particular record i need... so here is what i have!

        I have a table - Master - that contains all of the records, except for the ActionText, ActionDate and ActionCompleted records. those are kept in table ActionTable and have a field linked back to the BatchNumber in Master.

        I am trying to get the first record from each record displayed - through a simple query - to show up, telling me what i have to do, and when i need to do it. this info will show up on a continuous form, next to the record (Batch) it belongs to.

        i have tried using the select statement with the top 1; but i think my problem is that i have no idea how to reference the top record in ActionTable where ActionCompleted = 0 (false) and then have it also refer back to, via the batchis field, to the batch id in Master...

        if anybody has an idea, i am up for anything! or even another way around! then, we can move on to this calendar issue i have, with the same referencing problem! :)

        Comment

        Working...