Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21870

empty messageboxes on a fourm

$
0
0
hi
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)

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
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

it gives me the msgbox all right but it doesn't stop it till fields are fillied in
how can this be done

Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>