By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Displaying the next action on a form

P: 9
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
Aug 18 '08 #1
Share this Question
Share on Google+
3 Replies


Lokean
P: 71
select top(1) from (whateveryouhave)
where checkedfieldvalue = 0


or something like that.
Aug 18 '08 #2

P: 9
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?
Aug 18 '08 #3

P: 9
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! :)
Aug 19 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.