• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

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

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
        Parent.Page3.SetFocus
    
    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
    
    Parent.Page4.SetFocus
    [Forms]![frm_DataReporting]![ShiftReportingLVL]![AmtIn].SetFocus
Else
    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].SetFocus
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn].SelStart = 0
    Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn].SelLength = Len(Forms![frm_DataReporting]![WVLVLControlTotals].Form![txtCtlAmtIn])
    Parent.Page2.SetFocus
    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.Page4.SetFocus
    Parent.Page3.Visible = False
Else
    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

0
wlwebb
Asked:
wlwebb
1 Solution
 
Rey Obrero (Capricorn1)Commented:
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
0
 
wlwebbAuthor Commented:
Not the answer I wanted......but I was afraid you'd say that....  Thanks!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now