Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2012, 12:49 PM
Authorized User
 
Join Date: Feb 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Question restart sub procedure

This is of course a question by a very beginner
Here m the problem
I have a database with invoices (with a invoice date).
I want to print/ consult the invoices of a certain period (Fa_date between BEGIN and END)
To be sure, I make a cout in advance of teh numer of invoices in this "period". If there are none, i send a message box, and i want to restart the subprocedure to ask me other date. And here is my problem, i do'nt know how to "restart"
I think my problem is situated in the "case" routine


Private Sub cmdfactuur2datums_click()
'afdrukken facturen tussen 2 factuurdatums
Dim intTeller As Integer
Dim dBegin As String 'starting date
Dim dEind As String 'enddate

dBegin = CStr(InputBox("Geef begindatum"))
dEind = CStr(InputBox("geef einddtaum"))
Dim strVw As String
strVw = "Fa_datum between #" & [dBegin] & "# and #" & [dEind] & "#"
intTeller = DCount("[Fa_Nr]", "tblFactuur", strVw)

If intTeller = 0 Then
strInfo = MsgBox("Voor deze periode zijn facturen beschikbaar", vbRetryCancel)
Select Case strInfo
Case 4
??????????
Case 2
DoCmd.CancelEvent
End Select

End If
End Sub[/COLOR]

I guess there is/must be an instuction whichlet me "restart" my sub on the 1. line.
This sub is activated by a "button" on my openingsreeen

Thanks for any help
Marc





Similar Threads
Thread Thread Starter Forum Replies Last Post
Restart computer using c# harshaghanta C# 3 January 5th, 2015 05:23 AM
restart windows surendran SQL Server DTS 1 January 11th, 2007 12:25 AM
restart mysql crmpicco MySQL 1 September 13th, 2005 04:34 AM
Restart an application aldwinenriquez General .NET 0 August 16th, 2005 07:14 PM
restart crmpicco SQL Language 1 February 7th, 2005 11:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.