My db has a splash screen with a timer of 5seconds. What I want to happen is have it run a query 'on exit' (when the timer is over) and then prompt the user for action. When the form closes and the query is run, the message box will say, "There are X number of overdue tasks. Would you like to display them? [yes / no]" Clicking "yes" will open the form, frmReminder, with the data in a list box. Clicking "no" will take the user past this and onto the main menu form.
What the query does is find records that are over 7 days old and displays them in a listbox on a form, frmReminder. What I am trying to do, as stated in a previous post is to have the user click on 1 of 3 command buttons. These command buttons do the following:
1. "Print ALL Task (summary)"; prints all tasks in a summary report with just the data that is displayed in the listbox of: Task_ID, TaskDescription, Status, DateOriginated, DaysOverdue
2. "Print Selected Tasks Individually"; prints all the selected tasks (user uses 'ctrl' key to select multiple tasks just like in windows) and then prints out the selected records on the original report, rptTask, with all data of those records.
3. "Main Menu"; puts the user back to the main menu **this already works, I know how to do this**.
I think I'll have to 'call a procedure to run the query, qryReminders' but don't know if I'm right , how to write what I want it to do , or where to put it?
The first could be done by printing a report that used the same query for its source as the listbox (and thus contained the same records). The second you'll need to search here on multiselect to find the code to loop through the selected items. With that, build a wherecondition to run the same report as in the first option, but restricted to the selected items.
I swear we were working on this yesterday Graf - what's the fuss?
the 'yesterday' you are speaking of is regarding the form for 'reminders'. This was trying to figure out a way to automatically run the query, ask the user if they want to see the results and if so, display, if not, continue to main menu.
Well, I think that I have to put a procedure to run the query on the close of the splash screen. then it has to figure out if there are any records that meet the criteria of 'older than 7 days', then display the message box with the option to view (click yes and opens form) or not to view (click no and brings user to main menu).
I think it's gotta be a module with "run query", DCOUNT results, Message box (yes/no). not sure though so before I attempted it, I wanted to get other people's input if I'm going in the right direction or not. Especially since I'm not that good with modules.
The hardest part is finding out if there are any records to display.
One possible solution is to create a query that counts the number of "things".
If the result is 0 then you don't have to display the question, just load the main form.
I think that would be a good idea. The only thing that I wonder is that I believe that I'll still have to ask the question to display or not to then kick the user to the reminder display form or the main menu. Though I think putting in like: