Kamis, 28 Agustus 2014

Re: [MS_AccessPros] Pop up action items

 

Bill-


Absolutely.  Put some code in the Load event of your "main" form that opens automatically when your app starts.

Private Sub Form_Load()

    If Not IsNull(DLookup("ACTactID", "q_ActionItemsOpen", "ACTDate <= Date()")) Then
        If vbYes = MsgBox("There are action items that are due today or are " & _
            "past due.  Do you want to open the Action Items Due report?", vbYesNo, vbQuestion) Then
            DoCmd.OpenReport " name of action items report ", acViewPreview
        End If
    End If
End Sub



John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Aug 28, 2014, at 11:26 PM, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

In Access 2013, I have an "action items table".  The table has 5 fields.  ACTactID (Number, PK),  ACTDate (Date/Time, Date of Action Item),  ACTAction (text, Action item that needs to be addressed), ACTAgent (number, Agent ID) and ACTOpen (yes/no, to indicate if the action is still open)

 

Action Items are entered with the date they are due.  The problem is that the list of action items only is only visible in a report or form view if a person voluntarily opens the report or form.  Sometimes we forget to do this.   Is there a way to have a function that reads the date and if the action item is due then the report or form opens automatically.  I am thinking I would put it in the "On Open" event for the main form in the data base so that it opens first thing.

 

Each user has an ID and the report sorts the action items by the person ID.   I have a query that lists the person current action items.

 

The query is called q_ActionItemsOpen.  It calls all the fields in the table and sorts by Agent ID, Actions that are open and then in Date order.

 

Is there a way to have a function look through the records and if one of them are past due then the form or report opens.

 

Thanks for your help.

Bill

 

MN

 

 

 


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar