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
|