Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009

    Unanswered: Warning on form for missing daily report

    I have form where beforeupdate I have the following codes for preventing duplicate report date data entry, but i want to add one more code in case someone skips daily report to give them warning pop up message telling them they are skipping report date and if it is OK let them proceed if not let them enter the date that is missing. For example if today is 06/29/09 and there were no report entered yesterday 06/28/09. When they enter today's date I want then to get message reminding them "there were no data entry yesterday and if they want to proceed yes or no option"
    Yes = Thay can then proceed and enter today's report
    No = Cancel the date they entred and they can enter yesterday's report.

    Private Sub Report_Date_BeforeUpdate(Cancel As Integer)
    Dim rs As Object
    Dim NewItem As Date
    Set rs = Me.Recordset.Clone
    If DCount("ReportDate", "TblDailyManager", "[ReportDate] = #" & Me.ReportDate & "#") > 0 Then
    NewItem = Me.ReportDate
    rs.FindFirst "[ReportDate] = #" & Format(NewItem, "mm\/dd\/yyyy") & "#"
    If Not rs.EOF Then
    Me.Bookmark = rs.Bookmark
    MsgBox "This date has already been entered go to Correction to Manager Report form Item 6 and ubdate the information there [" & NewItem & "]"
    End If
    End If
    End Sub

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    And the problem is............
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    What is the question?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Apr 2009
    How to code if someone skips date in daily entry so they get warning that they are skipping date and if it is ok or not.

Posting Permissions

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