hi
i have this code for adding stuff to a database
its work fine but what i want to add in is if textbox 32 and 33 or if any of them are empty that a message box appears to tell ya to fill it in then u fill it in and it contunies on
was trying this with it
it gives me the msgbox all right but it doesn't stop it till fields are fillied in
how can this be done
i have this code for adding stuff to a database
Code:
Private Sub AddFunction()
sFinCal = "O:\OPXDB\FINCTR1.INI"
sFinCalGrp = "O:\OPXDB\FINGRP1.INI"
Select Case Combo1(0).Text ' Combo1(0) is the zero(0) index of the combo box control array
Case "A"
Call Annually(Text1(0).Text, Text1(32).Text, Text1(33).Text)
Case "S"
Call subAnnually(Text1(0).Text, Text1(32).Text, Text1(33).Text)
Case "Q"
Call Quarterly(Text1(0).Text, Text1(32).Text, Text1(33).Text)
Case "M"
Call Monthly(Text1(0).Text, Text1(32).Text, Text1(33).Text)
Case Else
End Select
'ClearFunction
'result = 0
End Sub
Public Sub Monthly(SecID As String, INTSTRTDTE As String, INTENDDTE As String)
was trying this with it
Code:
If Text1(32).Text = "" Then
MsgBox ("Please fill in vdate")
End If
If Text1(32).Text = "" Then
MsgBox ("Please fill in mdate")
End If
how can this be done