Access - Tabbed Forms. - Pause/Break/Wait to wait for a response to answer on another tab........

Posted on 2012-09-10
Last Modified: 2012-09-10
Hello all

I have a tabbed form which has about 8 tabs.  On One of those forms, if all of the amounts are zero, I make visible a tab where the user "Verifies" that all the amounts in fact should be zero.  

Once the answer to that "Verify" is true OR if all of the amounts aren't zero, then that first form opens a 3rd tabbed subform to a specific set of records......

Now then, what I want it to do is pause for that answer on the "Verify" tabbed form.

My current code make's that "Verify" form visible but is immediately going thru the rest of the code which kicks me to the 3rd form immediately.

Is there any type of code that will allow a "Non Timer" wait????

Here is the complete code.
Private Sub cmdSaveCtlTotals_Click()
If Me.txtCtlProofTotal = 0 Then
    If (Me.txtProofAbsoluteZeros) = 0 Then
        Parent.Page3.Visible = True
    End If
    curCtlTtlAmtIn = Me.txtCtlAmtIn
    curCtlTtlAmtOut = Me.txtCtlAmtOut
    curCtlTtlNetAmt = Me.txtCtlNetAmt
    curCtlTtlAmtVal = Me.txtCtlAmtVal
    Call UpdateTotals
    [Forms]![frm_DataReporting]![txtTtlAmtIn] = curCtlTtlAmtIn
    [Forms]![frm_DataReporting]![txtTtlAmtOut] = curCtlTtlAmtOut
    [Forms]![frm_DataReporting]![txtTtlNetAmt] = curCtlTtlNetAmt
    [Forms]![frm_DataReporting]![txtTtlAmtVal] = curCtlTtlAmtVal
    MsgBox "The Control Totals you have entered are not correct.  Please review your input of each Total Amount.", vbOKOnly
End If

End Sub

Private Sub UpdateTotals()

Dim v As Integer, CurTtlAmtIn As Currency, CurTtlAmtOut As Currency, CurTtlNetAmt As Currency, CurTtlAmtVal As Currency

CurTtlAmtIn = curCtlTtlAmtIn
CurTtlAmtOut = curCtlTtlAmtOut
CurTtlNetAmt = curCtlTtlNetAmt
CurTtlAmtVal = curCtlTtlAmtVal

v = Val(Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtNewShiftPrtgLVLCtlID])

CurrentDb.Execute "UPDATE ShiftReportingLVLCtl SET TtlAmtIn=" & CurTtlAmtIn & ", " & "TtlAmtOut=" & CurTtlAmtOut & ", " & "TtlNetAmt=" & CurTtlNetAmt & ", " & "TtlAmtVal=" & CurTtlAmtVal _
    & " WHERE ShiftRptgLVLCtlID=" & v, dbFailOnError
End Sub

**************** This is the code from that "Verify" Form
Private Sub cmdCancel_Click()
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn].SelStart = 0
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn].SelLength = Len(Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn])
    Parent.Page3.Visible = False
    Cancel = True
End Sub

Private Sub cmdVerifyAllZeros_Click()
If Me.ckBoxVerifyZeros = True Then
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtVerificationYN] = "True"
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtVerificationDate] = Now()
    Parent.Page3.Visible = False
    MsgBox ("You must check the box to verify that all the amounts on the Control Totals pages were intended to be zero Before clicking the ""Verify All Amounts Were Zero"" Button"), vbOKOnly, "Verify all amounts Zero Checkbox NOT Checked!"
End If

End Sub

Open in new window

Question by:wlwebb
    LVL 119

    Accepted Solution

    My current code make's that "Verify" form visible but is immediately going thru the rest of the code which kicks me to the 3rd form immediately.

    Is there any type of code that will allow a "Non Timer" wait????

    what you need is another command button in Page4 that when you click will make Page visible or not

    Author Closing Comment

    Not the answer I wanted......but I was afraid you'd say that....  Thanks!

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now