Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Posts
    559

    Unanswered: Splash screen with hidden query

    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?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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.
    Paul

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I swear we were working on this yesterday Graf - what's the fuss?
    George
    Home | Blog

  4. #4
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by georgev
    I swear we were working on this yesterday Graf - what's the fuss?
    george,

    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.

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Step 1
    Find out if there are any things to display
    Step 2
    Ask the user
    Step 3
    Depending on their response perform one of 3 actions.

    Which part are we stuck on?
    George
    Home | Blog

  6. #6
    Join Date
    Aug 2006
    Posts
    559
    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.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    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.
    Whaddya reckon?
    George
    Home | Blog

  8. #8
    Join Date
    Aug 2006
    Posts
    559
    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:

    If result = 0,
    Then open main menu

    Else result >0
    Then Message box of yes/no

  9. #9
    Join Date
    Aug 2006
    Posts
    559
    I wonder if i can do this by running a macro on the 'onclose' event of the splash screen? Then figure out how to make it so DCOUNT comes out with the "If statement" and "message box"?

Posting Permissions

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