Cant get form to Close

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

Getting "frmZeroAmountHolding" to open with message box but canf get it to
Close after making any selection from my Message box.............Thanks if
you can help.........Bob

Private Sub cmdDistributeAllInvoices_Click()

DoCmd.OpenForm "frmZeroAmountHolding"
Dim nRtnValue As Integer

nRtnValue = MsgBox("Are you sure you want to Distribute All Invoices?" &
vbCrLf & vbCrLf & "If you choose Yes, all the Invoices will have Invoice
Numbers.", vbCritical + vbYesNo + vbDefaultButton2, "Distribute all
Invoices")
If nRtnValue = vbYes Then
DoCmd.Hourglass True
subSetInvoiceValues
Application.SysCmd acSysCmdSetStatus, "Process is completed."
Application.SysCmd acSysCmdClearStatus


DoCmd.Hourglass False
Me.lstModify.Requery
DoCmd.Close "frmZeroAmountHolding" '????????

End If
End Sub
 
Thanks Bob , the form shows if there is any charges that are at $0.00 before
you distribute them, its like a warning and shows what invoices have this ,
so if that's Ok go ahead and distribute, or otherwise select no and correct
that invoice. One Invoice could be split 20 times , so you wouldnt want to
go edit 20 Invoices................Thanks Bob
 
Perhaps you can try this

DoCmd.Close acForm, "frmZeroAmountHolding", acSaveNo

Or you may need to close the form before starting your distribution code.
Maybe something with it is causing a problem.
--
Bob Larson
Access MVP
Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
Thanks but Beetle did the trick.....Bob

boblarson said:
Perhaps you can try this

DoCmd.Close acForm, "frmZeroAmountHolding", acSaveNo

Or you may need to close the form before starting your distribution code.
Maybe something with it is causing a problem.
--
Bob Larson
Access MVP
Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top