You are on page 1of 154

WELCOME FORM

Private Sub Command1_Click()

Unload Me

Form2.Show

End Sub

LOGIN FORM
Private Sub Command1_Click()

If Text1.Text = "ritu" Or Text1.Text = "RITU" And Text2.Text = "TIGER" Then

MsgBox "Login Successful"

Unload Me

frmprod.Show

Else

MsgBox "Invalid Password"

End If

End Sub

Private Sub Command2_Click()

End

End Sub

MDI FORM
Public state As Boolean

Dim rs As ADODB.Recordset

Dim f As Variant

'Private Sub Form_Load()

'datapath = "c:\sis\victor.acs"

'Me.Top = 300

'Me.Left = 300

' Agent1.Characters.Load "Genie", datapath

' Set Genie = Agent1.Characters("genie")

' Genie.LanguageID = &H409

' codebase = "#VERSION=1,0,0,0"

' Genie.Show

' Agent1.Characters("genie").Play ("greet")

' Genie.Speak "welcome to school information system"

' Genie.MoveTo 655, 402

' Agent1.Characters("genie").Play ("congratulate")

' 'Agent1.Characters("genie").Play ("process")

' 'Agent1.Characters("genie").Play "getattention"

' 'Agent1.Characters("genie").Play "getattentionreturn"

' 'Agent1.Characters("genie").Play ("read")


' 'Agent1.Characters("genie").Play ("readreturn")

' Agent1.Characters("genie").Play ("juggle")

' 'Agent1.Characters("genie").Play ("jugglereturn")

' 'Agent1.Characters("genie").Play ("write")

'

' End Sub

Private Sub mnuabt_Click()

End Sub

Private Sub Form_Activate()

If Modvariables.expired = True Then Label1.Visible = True

Modvariables.recordsetproperty rs

On Error Resume Next

rs.Open "SELECT * FROM HOSMAS"

If Err.Number = -2147217865 Then mnu_hm.Enabled = False: Err.Number = 0

rs.Close
rs.Open "SELECT * FROM accesion"

If Err.Number = -2147217865 Then mnuhelp.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM newadm"

If Err.Number = -2147217865 Then mnustudtl.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM prossale"

If Err.Number = -2147217865 Then mnutrans.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM feehdr"

If Err.Number = -2147217865 Then mnufeedtl.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM emp"

If Err.Number = -2147217865 Then mnupay.Enabled = False: Err.Number = 0

rs.Close
End Sub

'Private Sub Form_Load()

'cd.PrinterName = Printer.DeviceName

'cd.PrinterPort = Printer.Port

'cd.PrinterDriver = Printer.DriverName

'

'Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

'Modvariables.connect

'End Sub

Private Sub mnu_acc_Click()

End Sub

Private Sub mnfeewiz_Click()

frmfeewiz.Show

End Sub

Private Sub mnu_auth_Click()

frmauthr.Show

''frmmainmenu.Enabled = False
End Sub

Private Sub mnu_iss_Click()

End Sub

Private Sub mnu_baenq_Click()

bookaenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub MNU_BOOK_Click()

frmcatlg.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_btenq_Click()

frmbebt.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_emenq_Click()


frmempenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_mjenq_Click()

mjenquiry.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

'MDIguru.Hide

Unload Me

End Sub

Private Sub mnu_pend_Click()

frmpndenq.Show

'''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_penq_Click()

priodenq.Show
''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_pub_Click()

frmpubmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_rsm_Click()

frmreceivesm.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_rstu_Click()

frmreceive.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_saenq_Click()

frmsenq.Show
''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_sm_Click()

frmissuesm.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_stu_Click()

frmissue.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_stud_Click()

End Sub

Private Sub mnu_suppmas_Click()

frmsupmas.Show

''frmmainmenu.Enabled = False
End Sub

Private Sub mnuacmas_Click()

frmahead.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_vfe_Click()

frmvfees.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuaccreg_Click()

frmacmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuaccwis_Click()

frmaccwiz.Show

End Sub
Private Sub mnu2ndopr_Click()

'frmprod2nd.Show

frmprod2nd1.Show

End Sub

Private Sub mnuacmas1_Click()

frmoprmas.Show

End Sub

Private Sub mnuadform_Click()

frmadmission.Show

End Sub

Private Sub mnuadwisestudetail_Click()

detail

frmaddetail.Show

End Sub

Private Sub mnuasd_Click()

End Sub
Private Sub mnuar_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\accessionreg.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnubg_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\bloodgroup.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnubirthdays_Click()


frmrptbirthdaylist.Show

End Sub

Private Sub mnucalc_Click()

Dim calc

calc = Shell("c:\sis/calc.exe", 1)

End Sub

Private Sub mnublc_Click()

frmadmres.Show

End Sub

Private Sub mnubreq_Click()

frmbrequ.Show

End Sub

Private Sub mnucategorywiseconcise_Click()

concise

frmcategorywise.Show

End Sub

Private Sub mnucategorywisedetail_Click()


detail

frmcategorywise.Show

End Sub

Private Sub mnuchcertificate_Click()

frmcharacter.Show

End Sub

Private Sub mnuclasswiseconcise_Click()

concise

frmclasswise.Show

End Sub

Private Sub mnuclasswisedetail_Click()

detail

frmclasswise.Show

End Sub

Private Sub mnuclasswiserep_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"
cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\progressreport.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuclmas_Click()

frmclmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuadd1_Click()

frmsft_a.Show

End Sub

Private Sub mnuadd2_Click()

frmdis_a.Show

End Sub

Private Sub mnuconmas_Click()


frnmachinemas.Show

End Sub

Private Sub mnucsf_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\psalenot.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnudhhn_Click()

frmhnenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnudob_Click()

frmgreeting.Show

End Sub
Private Sub mnudsp_Click()

frmeTSP.Show

End Sub

Private Sub mnudvrs_Click()

frmestat.Show

End Sub

Private Sub mnudvsr_Click()

frmerout.Show

End Sub

Private Sub mnuempmas_Click()

frmempmas.Show

End Sub

Private Sub mnuentrance_Click()

frmsale.Show

''frmmainmenu.Enabled = False

End Sub
Private Sub mnuenttest_Click()

frmenter.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuexammas_Click()

frmexmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnudel1_Click()

frmsft_d.Show

End Sub

Private Sub mnudel2_Click()

frmdis_d.Show

End Sub

Private Sub mnuenq1_Click()

frmsft_e.Show
End Sub

Private Sub mnuenq2_Click()

frmdis_e.Show

End Sub

Private Sub mnuexit_Click()

Unload Me

End Sub

Private Sub mnufeemas_Click()

frmitemmas.Show

End Sub

Private Sub mnufeeslip_Click()

frmrptreceipt.Show

End Sub

Private Sub mnugs_Click()

frmgsal.Show

End Sub
Private Sub mnuhchart_Click()

frmhldtl.Show

End Sub

Private Sub mnuhealth_Click()

frmphysic.Show

End Sub

Private Sub mnuhosfur_Click()

frmitemmas.Show

End Sub

Private Sub mnumagiss_Click()

frmmissue.Show

End Sub

Private Sub mnumagrec_Click()

prdcldtl.Show

End Sub

Private Sub mnumagrecst_Click()


frmmrec.Show

End Sub

Private Sub mnumagrecstaff_Click()

mrecsm.Show

'''frmmainmenu.Show

End Sub

Private Sub mnumagstaff_Click()

misstosm.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnumarksheet_Click()

frmmarksheet.Show

End Sub

Private Sub mnumusterroll_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"
cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\muster.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnunadm_Click()

frmnewad.Show

End Sub

Private Sub mnunews_Click()

frmnews.Show

End Sub

Private Sub mnunsvn_Click()

frmesveh.Show

End Sub

Private Sub mnupayenq_Click()


frmpyenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnupayslips_Click()

frmpayslip.Show

End Sub

Private Sub mnupend_Click()

frmrcptnow.Show

'frmpend.Show

End Sub

Private Sub mnuperiod_Click()

frmprd.Show

'''frmmainmenu.Enabled = False

End Sub

Private Sub mnuprogressdtl_Click()

frmexres.Show
''frmmainmenu.Enabled = False

End Sub

Private Sub mnuprorec_Click()

frmedit.Show

frmedit.Label7(1).Caption = "Serial Number"

frmedit.Label8(1).Caption = "Form Number"

''frmmainmenu.Enabled = False

frmload = "frprosrec"

editme = True

End Sub

Private Sub mnurctpdtl_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.PageZoom (3)

cd.ReportFileName = "c:\gurukul\reports\rcpnodtl.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")


cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuregionwiseconcise_Click()

concise

frmregionwise.Show

End Sub

Private Sub mnuregionwisedetail_Click()

detail

frmregionwise.Show

End Sub

Private Sub mnuremc_Click()

frmesdbc.Show

End Sub

Private Sub mnurmas_Click()

frmroute.Show

End Sub
Private Sub mnurooms_Click()

frmhotra.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnurptchcertificate_Click()

frmchrpt.Show

End Sub

Private Sub mnusalary_Click()

frmemptrans.Show

End Sub

Private Sub mnusecmas_Click()

frmscmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusfnr_Click()

frmeFNR.Show

End Sub
Private Sub mnushsn_Click()

frmsnenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusibt_Click()

FRMEBHTI.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusl_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\studentledger.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuslc_Click()


frmslc.Show

End Sub

Private Sub mnuslcrpt_Click()

frmslrpt.Show

End Sub

Private Sub mnusll_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\staffledger.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnusmas_Click()

frmplace.Show

End Sub

Private Sub mnustreammas_Click()


frmstmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusubjmas_Click()

frmsbmas.Show

''frmmainmenu.Enabled = False

End Sub

Public Sub concise()

state = True

End Sub

Public Sub detail()

state = False

End Sub

Private Sub mnusvhn_Click()

frmvaenq.Show

''frmmainmenu.Enabled = False

End Sub
Private Sub mnuswiz_Click()

frmwizard.Show

End Sub

Private Sub mnutrchecklist_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\sisdata\sis.mdb;Persist


Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\transcheck.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuvdvn_Click()

frmevehi.Show

End Sub
Private Sub mnuvmas_Click()

frmvehicle.Show

End Sub

Private Sub mnuiind1_Click()

Dim iwlot2

iwlot2 = Shell("c:\e-apps\reports\lotnowiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind2_Click()

Dim iwdwpr2

iwdwpr2 = Shell("c:\e-apps\reports\itemwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind3_Click()

Dim mwise2

mwise2 = Shell("c:\e-apps\reports\machinewiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind4_Click()


Dim oprprod2opr

oprprod2opr = Shell("c:\e-apps\reports\operationwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind6_Click()

Dim oprprod1

oprprod1 = Shell("c:\e-apps\reports\operatorwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiindopr_Click()

frmproduction1.Show

End Sub

Private Sub mnuist1_Click()

Dim iwlot1

iwlot1 = Shell("c:\e-apps\reports\lotnowiseprod1opr.exe", 1)

End Sub

Private Sub mnuist2_Click()

Dim iwdwpr1

iwdwpr1 = Shell("c:\e-apps\reports\itemwiseprod1opr.exe", 1)
End Sub

Private Sub mnuist3_Click()

Dim mwise1

mwise1 = Shell("c:\e-apps\reports\machinewiseprod1opr.exe", 1)

End Sub

Private Sub mnuist4_Click()

Dim operationprod1

operationprod1 = Shell("c:\e-apps\reports\operationwiseprod1opr.exe", 1)

End Sub

Private Sub mnuist6_Click()

Dim opr1prod

opr1prod = Shell("c:\e-apps\reports\opreratorwiseprod1opr.exe", 1)

End Sub

Private Sub mnuistopr_Click()

frmoaschedule_a.Show

End Sub
Private Sub mnuistopr1_Click()

'frmrmmachinejob.Show

End Sub

Private Sub mnuitem1_Click()

Dim itemmas

itemmas = Shell("c:\e-apps\reports\itemmas.exe", 1)

End Sub

Private Sub mnumac_Click()

Dim machinemas

machinemas = Shell("c:\e-apps\reports\machinemas.exe", 1)

End Sub

Private Sub mnumod1_Click()

frmsft_m.Show

End Sub

Private Sub mnumod2_Click()

frmdis_m.Show

End Sub
Private Sub mnuopr1_Click()

Dim oprmas

oprmas = Shell("c:\e-apps\reports\oprmas.exe", 1)

End Sub

Private Sub mnuprodiind_Click()

Dim prodjob2

prodjob2 = Shell("c:\e-apps\reports\productionjobiind.exe", 1)

End Sub

Private Sub mnuprodist_Click()

Dim prodjob1

prodjob1 = Shell("c:\e-apps\reports\productionjobcard.exe", 1)

End Sub

Private Sub mnuprodist1_Click()

frmproduction2.Show

End Sub

Private Sub mnurmret_Click()


frmrmreturn.Show

End Sub

Private Sub mnurmwise_Click()

Dim rawmprod1

rawmprod1 = Shell("c:\e-apps\reports\rawmaterialwiseprod1opr.exe", 1)

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Key

Case "k1":

frmrmmachineissue.Show

Case "k2":

frmprod2nd.Show

Case "k3":

frmproduction2.Show

Case "k4":

frmproduction1.Show

Case "k5":

Unload Me

frmmain.Show
End Select

End Sub

ITEM MASTER FORM


Option Explicit

Dim check As Boolean

Dim str As String, txtbox As String

Dim removedrow As Integer

Dim removed, duplicate As Boolean

Dim rs As ADODB.Recordset

Dim rs1 As ADODB.Recordset, delete As Boolean

'Dim rs2 As ADODB.Recordset

Dim rs4 As ADODB.Recordset, clear1 As Boolean, item1txt As Boolean, item1lst As Boolean

Dim clear As Boolean, rmlst As Boolean, rmtxt As Boolean, str1 As String

Dim pisno As Integer, i As Integer

Public rmparamshow1 As Boolean, itemparam As Boolean, editfrm As Boolean

Private Function enterfun(vel)

If vel = 13 Then

Select Case txtbox

Case "txtitemcode": txtitemname.SetFocus

Case "txtitemname": txtuom.Enabled = True: txtuom.SetFocus

Case "txtuom": txtqty.Enabled = True: txtqty.SetFocus

Case "txtqty": txtrate.SetFocus

Case "txtrate": cmdadd.SetFocus


End Select

End If

End Function

Private Sub cmdadd_Click()

If cmdadd.Caption = "Add" Then

cmdadd.Caption = "&Save"

cmddelete.Caption = "Cancel"

cmdedit.Enabled = False

cmdexit.Enabled = True

enabledtext

txtitemcode.SetFocus

Else

Call checkcode

If check = False Then

Exit Sub

Else

If editfrm = True Then

editrecord

Else
saving

cmdedit.Enabled = True

End If

If duplicate = True Then

duplicate = False

Exit Sub

Else

cmdadd.Caption = "Add"

cmdexit.Enabled = True

cmddelete.Caption = "Delete"

emptytext

disabledtext

End If

End If

End If

End Sub

Private Sub checkcode()

If txtitemcode.Text = "" Then


MsgBox ("Enter the operation code"), vbExclamation

txtitemcode.SetFocus

Exit Sub

End If

If txtitemname.Text = "" Then

MsgBox ("Enter the operation name"), vbExclamation

txtitemname.SetFocus

Exit Sub

End If

If txtuom.Text = "" Then

MsgBox ("Enter the UoM"), vbExclamation

txtuom.SetFocus

Exit Sub

End If

check = True

End Sub

Private Sub cmddelete_Click()

If cmddelete.Caption = "Cancel" Then

cmdadd.Caption = "Add"
cmddelete.Caption = "Delete"

cmdedit.Enabled = True

emptytext

cmdexit.Enabled = True

cmdadd.Enabled = True

editfrm = False

Else

delete = True

txtitemname.Enabled = True

txtitemname.SetFocus

End If

End Sub

Private Sub cmdedit_Click()

Call enabledtext

txtitemcode.Enabled = True

cmddelete.Caption = "Cancel"

cmdexit.Enabled = False

cmdadd.Caption = "&Save"

editfrm = True

delete = False
txtitemname.Enabled = True

txtitemname.SetFocus

If editfrm = True Then

Call listitemname

lstitemname.Visible = True

End If

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub Form_Activate()

cmdadd.SetFocus

End Sub

Private Sub Form_Load()

emptytext

disabledtext

check = False
Modvariables.frmload = "frmitemmas"

Modvariables.connect

duplicate = False

itemparam = False

Me.Caption = "Item Master - " & co & ""

Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

End Sub

Private Sub Form_Unload(Cancel As Integer)

Modvariables.disconnect

Unload Me

End Sub

Private Sub txtitemcode_GotFocus()

txtitemcode.BackColor = &H0&

txtitemcode.ForeColor = &H80000005

txtbox = "txtitemcode"

End Sub

Private Sub txtitemcode_LostFocus()


txtitemcode.ForeColor = &H0&

txtitemcode.BackColor = &H80FFFF

If editfrm = False And cmdadd.Caption = "&Save" Then

Modvariables.recordsetproperty rs

rs.Open "select itemcode from itemmas where itemcode='" & Trim(txtitemcode.Text) & "'"

If rs.RecordCount <> 0 Then

MsgBox "This code already exists", vbInformation

txtitemcode.Text = ""

txtitemcode.SetFocus

End If

Set rs = Nothing

End If

End Sub

Private Sub txtitemname_GotFocus()

txtitemname.BackColor = &H0&

txtitemname.ForeColor = &H80000005

txtbox = "txtitemname"

item1txt = True

End Sub

Private Sub txtitemname_Change()


If editfrm = True Or delete = True Then

If clear1 = True Then

clear1 = False

Exit Sub

Else

If item1lst = False Then

str1 = Trim(txtitemname.Text)

Call listitemname

lstitemname.Visible = True

str1 = ""

End If

End If

End If

End Sub

Private Sub txtitemname_LostFocus()

txtitemname.ForeColor = &H0&

txtitemname.BackColor = &H80FFFF

If (item1lst) Then

lstitemname.Visible = False

End If
item1txt = False

End Sub

Private Sub txtqty_GotFocus()

txtqty.BackColor = &H0&

txtqty.ForeColor = &H80000005

txtbox = "txtqty"

End Sub

Private Sub txtqty_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

End Sub

Private Sub txtqty_LostFocus()

txtqty.ForeColor = &H0&

txtqty.BackColor = &H80FFFF

End Sub

Private Sub txtrate_GotFocus()

txtrate.BackColor = &H0&

txtrate.ForeColor = &H80000005

txtbox = "txtrate"
End Sub

Private Sub txtrate_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

End Sub

Private Sub txtrate_LostFocus()

txtrate.ForeColor = &H0&

txtrate.BackColor = &H80FFFF

End Sub

Private Sub Txtuom_Change()

Dim str As String

str = txtuom.Text

If Len(str) > 3 Then

MsgBox "Enter only three letter code", vbExclamation

txtuom.Text = ""

txtuom.SetFocus

Else

Exit Sub

End If

End Sub
Private Sub txtitemcode_KeyPress(KeyAscii As Integer)

If KeyAscii = 32 Then KeyAscii = 0

enterfun (KeyAscii)

If KeyAscii > 96 Then

KeyAscii = KeyAscii - 32

End If

End Sub

Private Sub txtitemname_KeyPress(KeyAscii As Integer)

If editfrm = True And KeyAscii = 13 Then Call loadingfrm

If delete = True And KeyAscii = 13 Then Call loadingfrm

enterfun (KeyAscii)

If KeyAscii > 96 Then

KeyAscii = KeyAscii - 32

End If

End Sub

Private Sub saving()

Dim i As Integer

On Error GoTo errorhandler

Modvariables.recordsetproperty rs

rs.Open "select * from itemmas"


With rs

.AddNew

.Fields("itemcode") = txtitemcode.Text

.Fields("itemname") = txtitemname.Text

.Fields("uom") = txtuom.Text

.Fields("itemrate") = Val(txtrate.Text)

.Fields("qty") = Val(txtqty.Text)

rs.Update

End With

Modvariables.disconnectrecordset rs

errorhandler:

'If Err = -2147217900 Then

If Err = -2147467259 Then

MsgBox "This code already exists"

txtitemcode.SetFocus

txtitemcode.SelStart = 0

txtitemcode.SelLength = Len(txtitemcode.Text)

duplicate = True

Exit Sub

End If

itemparam = False
check = False

End Sub

Private Function bold(vel)

If vel > 96 And vel < 123 Then

vel = vel - 32

bold = vel

Else

bold = vel

End If

End Function

Private Sub enabledtext()

txtitemcode.Enabled = True

txtitemname.Enabled = True

txtuom.Enabled = True

txtrate.Enabled = True

End Sub

Private Sub disabledtext()

txtitemname.Enabled = False
txtuom.Enabled = False

txtrate.Enabled = False

txtqty.Enabled = False

End Sub

Private Function num(vel)

If vel > 45 And vel < 58 Or vel = 8 Then

num = vel

End If

End Function

Private Sub emptytext()

txtitemcode.Text = ""

txtitemname.Text = ""

txtuom.Text = ""

txtrate.Text = ""

txtqty.Text = ""

End Sub

Private Sub txtuom_GotFocus()

txtuom.BackColor = &H0&

txtuom.ForeColor = &H80000005

txtbox = "txtuom"
End Sub

Private Sub txtuom_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

KeyAscii = bold(KeyAscii)

End Sub

Private Sub editrecord()

Dim i As Integer

Modvariables.recordsetproperty rs1

rs1.Open "select * from itemmas where itemcode='" & txtitemcode.Text & "'"

rs1.Fields("itemcode") = txtitemcode.Text

rs1.Fields("itemname") = Trim(txtitemname.Text)

rs1.Fields("uom") = Trim(txtuom.Text)

rs1.Fields("itemrate") = Val(txtrate.Text)

rs1.Fields("qty") = Val(txtqty.Text)

rs1.Update

rs1.Close

lstitemname.Visible = False

editfrm = False

End Sub
Private Sub loadingfrm()

Dim i As Integer

Modvariables.recordsetproperty rs

rs.Open "select * from itemmas where itemcode= '" & txtitemcode.Text & "'"

If rs.RecordCount = 0 Then

MsgBox "No record exist"

Exit Sub

Else

txtitemcode.Text = Trim(rs.Fields("itemcode"))

txtitemname.Text = Trim(rs.Fields("itemname"))

txtuom.Text = Trim(rs.Fields("uom"))

txtrate.Text = Trim(rs.Fields("itemrate"))

txtqty.Text = Trim(rs.Fields("qty"))

Modvariables.disconnectrecordset rs

End If

If delete = True Then

Dim str As String

str = MsgBox("Are u sure", vbYesNo)

If str = vbYes Then

db.Execute "delete from itemmas where itemcode='" & txtitemcode.Text & " '"
emptytext

lstitemname.Visible = False

cmdadd.SetFocus

Else

emptytext

lstitemname.Visible = False

cmdadd.SetFocus

End If

End If

End Sub

Private Sub Txtuom_LostFocus()

txtuom.ForeColor = &H0&

txtuom.BackColor = &H80FFFF

End Sub

Private Sub lstitemname_DblClick()

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

Exit Sub
End Sub

Private Sub lstitemname_GotFocus()

item1lst = True

End Sub

Private Sub lstitemname_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = 27 Then

txtitemname.Text = ""

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = vbKeyDown Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex + 1)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex + 1)
End If

If KeyCode = 13 Then txtitemname.SetFocus

End Sub

Private Sub lstitemname_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

End If

End Sub

Private Sub lstitemname_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = 27 Then

txtitemname.Text = ""
lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = vbKeyUp Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

End If

End Sub

Private Sub lstitemname_LostFocus()

txtitemname.ForeColor = &H0&

txtitemname.BackColor = &H80FFFF

If Not (item1txt) Then

lstitemname.Visible = False

End If

item1lst = False

'lbllistname.Caption = ""

End Sub

Private Sub txtitemname_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyDown Then


lstitemname.Enabled = True

lstitemname.SetFocus

End If

If KeyCode = 13 Then

If Trim(txtitemname.Text) = "" Then

txtitemname.SetFocus

Else

If editfrm = True Then

txtuom.SetFocus

Else

If delete = True Then

cmddelete.SetFocus

End If

End If

End If

End If

End Sub

Private Sub listitemname()


Dim k As Integer

Dim str As String

Modvariables.recordsetproperty rs1

str = Trim(txtitemname.Text)

rs1.Open "select itemcode,itemname from itemmas where itemname " & " like '" & str & "%" &
"'"

If rs1.RecordCount = 0 Then

lstitemname.clear

lstitemcode.clear

MsgBox "No Record Exists in Item Master"

Else

lstitemname.clear

lstitemcode.clear

For k = 1 To rs1.RecordCount

lstitemcode.AddItem Trim(rs1.Fields("itemcode"))

lstitemname.AddItem Trim(rs1.Fields("itemname"))

rs1.MoveNext

Next

End If

Modvariables.disconnectrecordset rs1

End Sub
MACHINE MASTER FORM
Option Explicit

Dim check As Boolean

Dim str As String, txtbox As String

Dim removedrow As Integer

Dim removed, duplicate As Boolean

Dim rs As ADODB.Recordset

Dim rs1 As ADODB.Recordset, delete As Boolean

'Dim rs2 As ADODB.Recordset

Dim rs4 As ADODB.Recordset, clear1 As Boolean, item1txt As Boolean, item1lst As Boolean

Dim clear As Boolean, rmlst As Boolean, rmtxt As Boolean, str1 As String

Dim pisno As Integer, i As Integer

Public rmparamshow1 As Boolean, itemparam As Boolean, editfrm As Boolean

Private Function enterfun(vel)

If vel = 13 Then

Select Case txtbox

Case "txtitemcode": txtitemname.SetFocus

Case "txtitemname": txtuom.Enabled = True: txtuom.SetFocus

Case "txtuom": txtqty.Enabled = True: txtqty.SetFocus

Case "txtqty": txtrate.SetFocus

Case "txtrate": cmdadd.SetFocus


End Select

End If

End Function

Private Sub cmdadd_Click()

If cmdadd.Caption = "Add" Then

cmdadd.Caption = "&Save"

cmddelete.Caption = "Cancel"

cmdedit.Enabled = False

cmdexit.Enabled = True

enabledtext

txtitemcode.SetFocus

Else

Call checkcode

If check = False Then

Exit Sub

Else

If editfrm = True Then

editrecord

Else
saving

cmdedit.Enabled = True

End If

If duplicate = True Then

duplicate = False

Exit Sub

Else

cmdadd.Caption = "Add"

cmdexit.Enabled = True

cmddelete.Caption = "Delete"

emptytext

disabledtext

End If

End If

End If

End Sub

Private Sub checkcode()

If txtitemcode.Text = "" Then


MsgBox ("Enter the operation code"), vbExclamation

txtitemcode.SetFocus

Exit Sub

End If

If txtitemname.Text = "" Then

MsgBox ("Enter the operation name"), vbExclamation

txtitemname.SetFocus

Exit Sub

End If

If txtuom.Text = "" Then

MsgBox ("Enter the UoM"), vbExclamation

txtuom.SetFocus

Exit Sub

End If

check = True

End Sub

Private Sub cmddelete_Click()

If cmddelete.Caption = "Cancel" Then

cmdadd.Caption = "Add"
cmddelete.Caption = "Delete"

cmdedit.Enabled = True

emptytext

cmdexit.Enabled = True

cmdadd.Enabled = True

editfrm = False

Else

delete = True

txtitemname.Enabled = True

txtitemname.SetFocus

End If

End Sub

Private Sub cmdedit_Click()

Call enabledtext

txtitemcode.Enabled = True

cmddelete.Caption = "Cancel"

cmdexit.Enabled = False

cmdadd.Caption = "&Save"

editfrm = True

delete = False
txtitemname.Enabled = True

txtitemname.SetFocus

If editfrm = True Then

Call listitemname

lstitemname.Visible = True

End If

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub Form_Activate()

cmdadd.SetFocus

End Sub

Private Sub Form_Load()

emptytext

disabledtext

check = False
Modvariables.frmload = "frmitemmas"

Modvariables.connect

duplicate = False

itemparam = False

Me.Caption = "Item Master - " & co & ""

Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

End Sub

Private Sub Form_Unload(Cancel As Integer)

Modvariables.disconnect

Unload Me

End Sub

Private Sub txtitemcode_GotFocus()

txtitemcode.BackColor = &H0&

txtitemcode.ForeColor = &H80000005

txtbox = "txtitemcode"

End Sub

Private Sub txtitemcode_LostFocus()


txtitemcode.ForeColor = &H0&

txtitemcode.BackColor = &H80FFFF

If editfrm = False And cmdadd.Caption = "&Save" Then

Modvariables.recordsetproperty rs

rs.Open "select itemcode from itemmas where itemcode='" & Trim(txtitemcode.Text) & "'"

If rs.RecordCount <> 0 Then

MsgBox "This code already exists", vbInformation

txtitemcode.Text = ""

txtitemcode.SetFocus

End If

Set rs = Nothing

End If

End Sub

Private Sub txtitemname_GotFocus()

txtitemname.BackColor = &H0&

txtitemname.ForeColor = &H80000005

txtbox = "txtitemname"

item1txt = True

End Sub

Private Sub txtitemname_Change()


If editfrm = True Or delete = True Then

If clear1 = True Then

clear1 = False

Exit Sub

Else

If item1lst = False Then

str1 = Trim(txtitemname.Text)

Call listitemname

lstitemname.Visible = True

str1 = ""

End If

End If

End If

End Sub

Private Sub txtitemname_LostFocus()

txtitemname.ForeColor = &H0&

txtitemname.BackColor = &H80FFFF

If (item1lst) Then

lstitemname.Visible = False

End If
item1txt = False

End Sub

Private Sub txtqty_GotFocus()

txtqty.BackColor = &H0&

txtqty.ForeColor = &H80000005

txtbox = "txtqty"

End Sub

Private Sub txtqty_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

End Sub

Private Sub txtqty_LostFocus()

txtqty.ForeColor = &H0&

txtqty.BackColor = &H80FFFF

End Sub

Private Sub txtrate_GotFocus()

txtrate.BackColor = &H0&

txtrate.ForeColor = &H80000005

txtbox = "txtrate"
End Sub

Private Sub txtrate_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

End Sub

Private Sub txtrate_LostFocus()

txtrate.ForeColor = &H0&

txtrate.BackColor = &H80FFFF

End Sub

Private Sub Txtuom_Change()

Dim str As String

str = txtuom.Text

If Len(str) > 3 Then

MsgBox "Enter only three letter code", vbExclamation

txtuom.Text = ""

txtuom.SetFocus

Else

Exit Sub

End If

End Sub
Private Sub txtitemcode_KeyPress(KeyAscii As Integer)

If KeyAscii = 32 Then KeyAscii = 0

enterfun (KeyAscii)

If KeyAscii > 96 Then

KeyAscii = KeyAscii - 32

End If

End Sub

Private Sub txtitemname_KeyPress(KeyAscii As Integer)

If editfrm = True And KeyAscii = 13 Then Call loadingfrm

If delete = True And KeyAscii = 13 Then Call loadingfrm

enterfun (KeyAscii)

If KeyAscii > 96 Then

KeyAscii = KeyAscii - 32

End If

End Sub

Private Sub saving()

Dim i As Integer

On Error GoTo errorhandler

Modvariables.recordsetproperty rs

rs.Open "select * from itemmas"


With rs

.AddNew

.Fields("itemcode") = txtitemcode.Text

.Fields("itemname") = txtitemname.Text

.Fields("uom") = txtuom.Text

.Fields("itemrate") = Val(txtrate.Text)

.Fields("qty") = Val(txtqty.Text)

rs.Update

End With

Modvariables.disconnectrecordset rs

errorhandler:

'If Err = -2147217900 Then

If Err = -2147467259 Then

MsgBox "This code already exists"

txtitemcode.SetFocus

txtitemcode.SelStart = 0

txtitemcode.SelLength = Len(txtitemcode.Text)

duplicate = True

Exit Sub

End If

itemparam = False
check = False

End Sub

Private Function bold(vel)

If vel > 96 And vel < 123 Then

vel = vel - 32

bold = vel

Else

bold = vel

End If

End Function

Private Sub enabledtext()

txtitemcode.Enabled = True

txtitemname.Enabled = True

txtuom.Enabled = True

txtrate.Enabled = True

End Sub

Private Sub disabledtext()

txtitemname.Enabled = False
txtuom.Enabled = False

txtrate.Enabled = False

txtqty.Enabled = False

End Sub

Private Function num(vel)

If vel > 45 And vel < 58 Or vel = 8 Then

num = vel

End If

End Function

Private Sub emptytext()

txtitemcode.Text = ""

txtitemname.Text = ""

txtuom.Text = ""

txtrate.Text = ""

txtqty.Text = ""

End Sub

Private Sub txtuom_GotFocus()

txtuom.BackColor = &H0&

txtuom.ForeColor = &H80000005

txtbox = "txtuom"
End Sub

Private Sub txtuom_KeyPress(KeyAscii As Integer)

enterfun (KeyAscii)

KeyAscii = bold(KeyAscii)

End Sub

Private Sub editrecord()

Dim i As Integer

Modvariables.recordsetproperty rs1

rs1.Open "select * from itemmas where itemcode='" & txtitemcode.Text & "'"

rs1.Fields("itemcode") = txtitemcode.Text

rs1.Fields("itemname") = Trim(txtitemname.Text)

rs1.Fields("uom") = Trim(txtuom.Text)

rs1.Fields("itemrate") = Val(txtrate.Text)

rs1.Fields("qty") = Val(txtqty.Text)

rs1.Update

rs1.Close

lstitemname.Visible = False

editfrm = False

End Sub
Private Sub loadingfrm()

Dim i As Integer

Modvariables.recordsetproperty rs

rs.Open "select * from itemmas where itemcode= '" & txtitemcode.Text & "'"

If rs.RecordCount = 0 Then

MsgBox "No record exist"

Exit Sub

Else

txtitemcode.Text = Trim(rs.Fields("itemcode"))

txtitemname.Text = Trim(rs.Fields("itemname"))

txtuom.Text = Trim(rs.Fields("uom"))

txtrate.Text = Trim(rs.Fields("itemrate"))

txtqty.Text = Trim(rs.Fields("qty"))

Modvariables.disconnectrecordset rs

End If

If delete = True Then

Dim str As String

str = MsgBox("Are u sure", vbYesNo)

If str = vbYes Then

db.Execute "delete from itemmas where itemcode='" & txtitemcode.Text & " '"
emptytext

lstitemname.Visible = False

cmdadd.SetFocus

Else

emptytext

lstitemname.Visible = False

cmdadd.SetFocus

End If

End If

End Sub

Private Sub Txtuom_LostFocus()

txtuom.ForeColor = &H0&

txtuom.BackColor = &H80FFFF

End Sub

Private Sub lstitemname_DblClick()

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

Exit Sub
End Sub

Private Sub lstitemname_GotFocus()

item1lst = True

End Sub

Private Sub lstitemname_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = 27 Then

txtitemname.Text = ""

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = vbKeyDown Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex + 1)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex + 1)
End If

If KeyCode = 13 Then txtitemname.SetFocus

End Sub

Private Sub lstitemname_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

End If

End Sub

Private Sub lstitemname_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = 27 Then

txtitemname.Text = ""
lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = vbKeyUp Then

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

End If

End Sub

Private Sub lstitemname_LostFocus()

txtitemname.ForeColor = &H0&

txtitemname.BackColor = &H80FFFF

If Not (item1txt) Then

lstitemname.Visible = False

End If

item1lst = False

'lbllistname.Caption = ""

End Sub

Private Sub txtitemname_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyDown Then


lstitemname.Enabled = True

lstitemname.SetFocus

End If

If KeyCode = 13 Then

If Trim(txtitemname.Text) = "" Then

txtitemname.SetFocus

Else

If editfrm = True Then

txtuom.SetFocus

Else

If delete = True Then

cmddelete.SetFocus

End If

End If

End If

End If

End Sub

Private Sub listitemname()


Dim k As Integer

Dim str As String

Modvariables.recordsetproperty rs1

str = Trim(txtitemname.Text)

rs1.Open "select itemcode,itemname from itemmas where itemname " & " like '" & str & "%" &
"'"

If rs1.RecordCount = 0 Then

lstitemname.clear

lstitemcode.clear

MsgBox "No Record Exists in Item Master"

Else

lstitemname.clear

lstitemcode.clear

For k = 1 To rs1.RecordCount

lstitemcode.AddItem Trim(rs1.Fields("itemcode"))

lstitemname.AddItem Trim(rs1.Fields("itemname"))

rs1.MoveNext

Next

End If

Modvariables.disconnectrecordset rs1

End Sub
SHIFT MASTER FORM
Option Explicit

Dim txtbox As String, del As String, srn As Integer

Dim check, editfrm As Boolean, delete As Boolean

Dim validstr As Boolean, duplicate As Boolean, gridcount As Integer, gridcount1 As Integer

Dim fieldname As String, fieldcode As String, tablename As String

Dim rs As ADODB.Recordset, rs1 As ADODB.Recordset, rs2 As ADODB.Recordset, rs3 As


ADODB.Recordset

Dim velstr As String, edit As Boolean, rmlst As Boolean, rmlst1 As Boolean

Dim clear As Boolean, cels As Integer, dt As Date

Dim ctnamelst As Boolean, ctnametxt As Boolean, gridedit As Boolean

Public flag1 As Boolean, showformsr As Boolean

Dim s1 As Double, e1 As Double, str1 As String, mrpcount As Integer

Dim i As Integer, gridvalue(20) As String, gridvalue1(20) As Integer, k As Integer

Public ncnt As Integer, j As Integer, gtotal As Double, gridclik As Boolean, totamount As Double

Public reqqty As Long, dispqty As Long, totbal As Long, disqty As Long, baltoday As Long

Dim trate As Double

'Private Sub loadingfrm()

'Modvariables.recordsetproperty rs

'rs.Open "select * from oahdr where oano= " & Trim(txtoano.Text) & ""

'If rs.RecordCount = 0 Then

'MsgBox ("Record doesn't Exist")


'txtoano.SetFocus

'Exit Sub

'End If

'txtoano.Text = Trim(rs.Fields("oano"))

'txtoadate.Day = Day(rs.Fields("oadate"))

'txtoadate.Month = Month(rs.Fields("oadate"))

'txtoadate.Year = Year(rs.Fields("oadate"))

'txtcustcode.Text = rs.Fields("custcode")

'Modvariables.recordsetproperty rs1

'rs1.Open "select * from cust where custcode='" & rs.Fields("custcode") & "' "

'txtcustname.Text = Trim(rs1.Fields("custname"))

'rs1.Close

'Modvariables.recordsetproperty rs1

'rs1.Open "select p.itemcode,q.itemname,p.schqty from oahdr P, itemmas q where oano=" &


txtoano.Text & " and p.itemcode=q.itemcode"

'For k = 1 To rs1.RecordCount

'grid1.TextMatrix(k, 0) = srn

'grid1.TextMatrix(k, 1) = Trim(rs1.Fields("itemname"))

'grid1.TextMatrix(k, 2) = Trim(rs1.Fields("itemcode"))
'grid1.TextMatrix(k, 3) = Trim(rs1.Fields("schqty"))

'Call bal

'rs1.MoveNext

'grid1.Rows = grid1.Rows + 1

'srn = srn + 1

'Next k

'Modvariables.disconnectrecordset rs1

'grid1.SetFocus

'End Sub

Private Sub bal()

Modvariables.disconnectrecordset rs3

Modvariables.recordsetproperty rs3

rs3.Open " select sum(dispqty)from dispatchdtl where oano=" & txtoano.Text & " and
itemcode='" & grid1.TextMatrix(k, 2) & "'"

If rs3.RecordCount <> 0 Then

If IsNull(rs3(0)) Then

dispqty = 0

Else

dispqty = rs3(0)

End If

Else
dispqty = 0

End If

grid1.TextMatrix(k, 4) = Val(dispqty)

grid1.TextMatrix(k, 5) = Val(grid1.TextMatrix(k, 3)) - Val(grid1.TextMatrix(k, 4))

Modvariables.disconnectrecordset rs3

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

'Private Sub disabletxt()

'txtdispno.Enabled = False

'dispdate.Enabled = False

'txtpono.Enabled = False

'txtoadate.Enabled = False

'txtcustname.Enabled = False

'End Sub

Private Sub loadgrid1()

grid1.ColWidth(0) = 250

grid1.ColWidth(1) = 2600

grid1.ColWidth(2) = 0
grid1.ColWidth(3) = 1200

grid1.ColWidth(4) = 1200

grid1.ColWidth(5) = 1200

grid1.ColWidth(6) = 1200

grid1.ColWidth(7) = 1200

grid1.TextMatrix(0, 0) = "SrNo"

grid1.TextMatrix(0, 1) = "Item Name"

grid1.TextMatrix(0, 2) = "Item code"

grid1.TextMatrix(0, 3) = "Schedule Qty"

grid1.TextMatrix(0, 4) = "Disp Till Date"

grid1.TextMatrix(0, 5) = "Balance Qty"

grid1.TextMatrix(0, 6) = "Rate"

grid1.TextMatrix(0, 7) = "Disp.Qty"

End Sub

'Private Sub enabletxt()

'txtdispno.Enabled = True

'dispdate.Enabled = True

'txtpono.Enabled = True

'txtoadate.Enabled = True

'txtcustname.Enabled = True

'End Sub
'Private Sub emptytxt()

'txtpono.Text = ""

'txtcustname.Text = ""

'txtitemname.Text = ""

'Dim i As Integer

'Call position

'For i = 0 To grid1.Cols - 1

'grid1.TextMatrix(1, i) = ""

'Next i

'For i = 1 To grid1.Rows - 1

'grid1.TextMatrix(i, 0) = ""

'grid1.TextMatrix(i, 1) = ""

'grid1.TextMatrix(i, 2) = ""

'grid1.TextMatrix(i, 3) = ""

'grid1.TextMatrix(i, 4) = ""

'grid1.TextMatrix(i, 5) = ""

'grid1.TextMatrix(i, 6) = ""

'grid1.TextMatrix(i, 7) = ""

'Next i

'grid1.Rows = 2
'srn = 1

'End Sub

Private Function bold(vel)

If vel > 96 And vel < 123 Then

vel = vel - 32

bold = vel

Else

bold = vel

End If

End Function

Private Function datefun(vel)

If Not (vel > 45 And vel < 58) Then

If vel = 8 Then

datefun = vel

Else

datefun = 0

End If

Else

If vel = 46 Then

datefun = 47
Else

datefun = vel

End If

End If

End Function

Private Sub valid()

validstr = False

If txtdispno.Text = "" Then

MsgBox "Please Enter the Dispatch No.", vbOKOnly

txtdispno.SetFocus

Exit Sub

End If

'If Trim(txtcustname.Text) = "" Then

'MsgBox "Customer Name is Blank", vbOKOnly

'txtcustname.SetFocus

'Exit Sub

'End If

Dim check As Integer

check = 0
For i = 1 To grid1.Rows - 1

If grid1.TextMatrix(i, 1) <> "" Then

check = 1

End If

Next

If check = 0 Then

MsgBox "Blank grid not accepted"

Exit Sub

End If

Dim p1 As Integer

p1 = 0

For i = 1 To grid1.Rows - 1

If grid1.TextMatrix(i, 1) <> "" And grid1.TextMatrix(i, 0) <> "X" Then

If Val(grid1.TextMatrix(i, 7)) = 0 Then

'MsgBox "Qty Can not be blank " & i & " Row"

p1 = 1

Else

p1 = 0

Exit For
End If

End If

Next i

If p1 = 1 Then

MsgBox ("Dispatch Quantity Cann't be blank in every Row")

validstr = False

grid1.SetFocus

Exit Sub

End If

For i = 1 To grid1.Rows - 1

If Val(grid1.TextMatrix(i, 7)) > Val(grid1.TextMatrix(i, 5)) Then

MsgBox ("Dispatch Qty cann't be greater than balance qty in " & i & " Row ")

validstr = False

grid1.SetFocus

Exit Sub

End If

Next i

validstr = True

End Sub
Private Sub cmdsave_Click()

Dim tot As Double

enabletxt

valid

If validstr = True Then saving: emptytxt: increase: dispdate.SetFocus: srn = 1

If duplicate = True Then

duplicate = False

Exit Sub

End If

End Sub

Private Sub Form_Activate()

enabletxt

txtdispno.Enabled = False

dispdate.Enabled = True

dispdate.SetFocus

End Sub

'Private Sub Form_Load()

'Modvariables.connect

'rmlst = False

'rmlst1 = False
'ctnamelst = False

'cels = 1

'srn = 1

'gridcount = 1

'gridcount1 = 1

'ctnametxt = False

'clear = False

'flag1 = False

'gridedit = False

'dispdate.Value = Date

'txtoadate.Value = Date

'disabletxt

'emptytxt

'txtcustname.Locked = True

'loadgrid1

'validstr = False

'duplicate = False

'Call increase

'Me.Caption = "Incoming - " & co & ""

'Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

'End Sub
Private Function numeric(vel)

If vel > 47 And vel < 58 Or vel = 46 Or vel = 8 Then

numeric = vel

End If

End Function

Private Sub Form_Unload(Cancel As Integer)

'modvariables.disconnect

End Sub

Private Sub grid1_EnterCell()

If grid1.Col = 1 And Trim(grid1.TextMatrix(grid1.RowSel, 1)) = "" Then txtitemname.SetFocus

End Sub

Private Sub lstitemname_DblClick()

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End Sub

Private Sub lstitemname_KeyDown(KeyCode As Integer, Shift As Integer)

rmlst = True
If KeyCode = vbKeySpace Then

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

txtitemname.Text = lstitemname.List(lstitemname.ListIndex)

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = 27 Then

txtitemname.Text = ""

lstitemname.Visible = False

txtitemname.SetFocus

End If

If KeyCode = vbKeyDown Then

If lstitemname.ListIndex + 1 < lstitemname.ListCount Then

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)

txtitemname.Text = lstitemname.List(lstitemname.ListIndex + 1)

End If

End If

If KeyCode = vbKeyUp Then

If lstitemname.ListIndex > 0 Then

txtitemcode.Text = lstitemcode.List(lstitemname.ListIndex)
txtitemname.Text = lstitemname.List(lstitemname.ListIndex - 1)

End If

End If

End Sub

Private Sub lstitemname_LostFocus()

'rmlst = True

End Sub

Private Sub txtcustname_LostFocus()

txtcustname.ForeColor = &H0&

txtcustname.BackColor = &H80FFFF

End Sub

Private Sub txtitemname_GotFocus()

txtitemname.BackColor = &H0&

txtitemname.ForeColor = &H80000005

rmlst = False

End Sub

Private Sub txtitemname_KeyDown(KeyCode As Integer, Shift As Integer)


If KeyCode = vbKeyDown Then

If lstitemname.Visible = True Then

lstitemname.SetFocus

End If

End If

End Sub

Private Sub txtitemname_KeyPress(KeyAscii As Integer)

If KeyAscii > 96 Then

KeyAscii = KeyAscii - 32

End If

If KeyAscii = 13 Then

For i = 1 To grid1.Rows - 1

If (txtitemname.Text) = grid1.TextMatrix(i, 1) Then

MsgBox ("Same Item cann't be entered")

txtitemname.Text = ""

txtitemname.SetFocus

Exit Sub

Exit For

End If

Next i

grid1.TextMatrix(gridcount, 0) = srn
grid1.TextMatrix(gridcount, 1) = txtitemname.Text

grid1.TextMatrix(gridcount, 2) = lstitemcode.List(lstitemname.ListIndex)

grid1.Rows = grid1.Rows + 1

gridcount = gridcount + 1

srn = srn + 1

grid1.SetFocus

End If

End Sub

'Private Sub grid1_Click()

'If grid1.Col = 1 Then

'If grid1.TextMatrix(grid1.Row, 1) <> "" Then

'If grid1.TextMatrix(grid1.Row, 0) = "X" Then

'grid1.TextMatrix(grid1.Row, 0) = ""

'Else

'grid1.TextMatrix(grid1.Row, 0) = "X"

'End If

'End If

'End If

'End Sub

Private Sub txtitemname_LostFocus()


txtitemname.ForeColor = &H0&

txtitemname.BackColor = &H80FFFF

End Sub

Private Sub dispdate_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then txtoano.SetFocus

End Sub

Private Sub grid1_KeyPress(KeyAscii As Integer)

If grid1.Col = 0 Or grid1.Col = 1 Or grid1.Col = 3 Or grid1.Col = 4 Or grid1.Col = 5 Then Exit


Sub

If grid1.Col = 6 Or grid1.Col = 7 Then

If (KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 46 Or KeyAscii = 8) Then

KeyAscii = KeyAscii

Else

KeyAscii = 0

End If

End If

'If grid1.Col = 7 Then

' If KeyAscii = 121 Or KeyAscii = 110 Or KeyAscii = 8 Then

' KeyAscii = KeyAscii


' Else

' KeyAscii = 0

' End If

'End If

If KeyAscii = 8 Then

If grid1.TextMatrix(grid1.RowSel, grid1.ColSel) = "" Then Exit Sub

Dim i As Integer

Text1.Text = grid1.TextMatrix(grid1.RowSel, grid1.ColSel)

Text1.SelStart = 0

i = Len(Text1.Text)

Text1.SelLength = i - 1

grid1.TextMatrix(grid1.RowSel, grid1.ColSel) = Text1.SelText

Text1.Text = ""

i=0

Exit Sub

End If

If KeyAscii <> 13 Then grid1.Text = grid1.Text + Chr(KeyAscii)

End Sub

Private Sub txtdispno_LostFocus()

txtdispno.ForeColor = &H0&
txtdispno.BackColor = &H80FFFF

End Sub

Private Sub txtpodate_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then txtcustname.SetFocus

End Sub

Private Sub txtoano_GotFocus()

txtoano.BackColor = &H0&

txtoano.ForeColor = &H80000005

End Sub

Private Sub txtoano_LostFocus()

txtoano.ForeColor = &H0&

txtoano.BackColor = &H80FFFF

If txtoano.Text = "" Then

Exit Sub

End If

'cmdhelp.Enabled = False

End Sub

Private Sub txtdispno_KeyPress(KeyAscii As Integer)

txtdispno.BackColor = &H0&
txtdispno.ForeColor = &H80000005

If KeyAscii = 13 Then

dispdate.SetFocus

KeyAscii = bold(KeyAscii)

KeyAscii = numeric(KeyAscii)

End If

End Sub

'Private Sub txtoano_KeyPress(KeyAscii As Integer)

'If KeyAscii = 13 Then

'If txtoano.Text = "" Then

'MsgBox ("please enter OA no")

'txtoano.SetFocus

'Exit Sub

'End If

'emptytxt

'loadingfrm

'grid1.SetFocus

'End If

'If (KeyAscii >= 97 And KeyAscii < 123) Then

'KeyAscii = KeyAscii - 32

'Else
'KeyAscii = KeyAscii

'End If

'End Sub

Private Sub saving()

Modvariables.recordsetproperty rs

Modvariables.recordsetproperty rs1

Modvariables.recordsetproperty rs2

rs.Open "select * from dispatchhdr "

With rs

.AddNew

.Fields("dispno") = txtdispno.Text

.Fields("dispdate") = dispdate.Value

'.Fields("custcode") = txtcustcode.Text

'.Fields("oano") = Trim(txtoano.Text)

'.Fields("oadate") = txtoadate.Value

.Update

End With

rs.Close

rs.Open "select * from dispatchdtl"

For i = 1 To grid1.Rows - 2
If grid1.TextMatrix(i, 0) <> "X" And Val(grid1.TextMatrix(i, 7)) <> 0 Then

With rs

.AddNew

.Fields("dispno") = Val(txtdispno.Text)

'.Fields("oano") = Val(txtoano.Text)

.Fields("dispdate") = dispdate.Value

.Fields("itemcode") = Trim(grid1.TextMatrix(i, 2))

.Fields("dispqty") = Val(grid1.TextMatrix(i, 7))

.Fields("rate") = Val(grid1.TextMatrix(i, 6))

End With

rs.Update

End If

Next

rs.Close

End Sub

Private Sub increase()

Modvariables.recordsetproperty rs

rs.Open "select dispno from dispatchhdr order by dispno"

If rs.RecordCount = 0 Then

txtdispno.Text = 1

Exit Sub
Else

rs.MoveLast

txtdispno.Text = rs.Fields(0) + 1

End If

Modvariables.disconnectrecordset rs

End Sub

DISPATCH FORM
Public state As Boolean

Dim rs As ADODB.Recordset

Dim f As Variant

'Private Sub Form_Load()

'datapath = "c:\sis\victor.acs"

'Me.Top = 300

'Me.Left = 300

' Agent1.Characters.Load "Genie", datapath

' Set Genie = Agent1.Characters("genie")

' Genie.LanguageID = &H409

' codebase = "#VERSION=1,0,0,0"

' Genie.Show

' Agent1.Characters("genie").Play ("greet")

' Genie.Speak "welcome to school information system"

' Genie.MoveTo 655, 402

' Agent1.Characters("genie").Play ("congratulate")

' 'Agent1.Characters("genie").Play ("process")

' 'Agent1.Characters("genie").Play "getattention"

' 'Agent1.Characters("genie").Play "getattentionreturn"

' 'Agent1.Characters("genie").Play ("read")

' 'Agent1.Characters("genie").Play ("readreturn")


' Agent1.Characters("genie").Play ("juggle")

' 'Agent1.Characters("genie").Play ("jugglereturn")

' 'Agent1.Characters("genie").Play ("write")

'

' End Sub

Private Sub mnuabt_Click()

End Sub

Private Sub Form_Activate()

If Modvariables.expired = True Then Label1.Visible = True

Modvariables.recordsetproperty rs

On Error Resume Next

rs.Open "SELECT * FROM HOSMAS"

If Err.Number = -2147217865 Then mnu_hm.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM accesion"


If Err.Number = -2147217865 Then mnuhelp.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM newadm"

If Err.Number = -2147217865 Then mnustudtl.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM prossale"

If Err.Number = -2147217865 Then mnutrans.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM feehdr"

If Err.Number = -2147217865 Then mnufeedtl.Enabled = False: Err.Number = 0

rs.Close

rs.Open "SELECT * FROM emp"

If Err.Number = -2147217865 Then mnupay.Enabled = False: Err.Number = 0

rs.Close

End Sub
'Private Sub Form_Load()

'cd.PrinterName = Printer.DeviceName

'cd.PrinterPort = Printer.Port

'cd.PrinterDriver = Printer.DriverName

'

'Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

'Modvariables.connect

'End Sub

Private Sub mnu_acc_Click()

End Sub

Private Sub mnfeewiz_Click()

frmfeewiz.Show

End Sub

Private Sub mnu_auth_Click()

frmauthr.Show

''frmmainmenu.Enabled = False

End Sub
Private Sub mnu_iss_Click()

End Sub

Private Sub mnu_baenq_Click()

bookaenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub MNU_BOOK_Click()

frmcatlg.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_btenq_Click()

frmbebt.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_emenq_Click()

frmempenq.Show
''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_mjenq_Click()

mjenquiry.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

'MDIguru.Hide

Unload Me

End Sub

Private Sub mnu_pend_Click()

frmpndenq.Show

'''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_penq_Click()

priodenq.Show

''frmmainmenu.Enabled = False
End Sub

Private Sub mnu_pub_Click()

frmpubmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_rsm_Click()

frmreceivesm.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_rstu_Click()

frmreceive.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_saenq_Click()

frmsenq.Show

''frmmainmenu.Enabled = False
End Sub

Private Sub mnu_sm_Click()

frmissuesm.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_stu_Click()

frmissue.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_stud_Click()

End Sub

Private Sub mnu_suppmas_Click()

frmsupmas.Show

''frmmainmenu.Enabled = False

End Sub
Private Sub mnuacmas_Click()

frmahead.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnu_vfe_Click()

frmvfees.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuaccreg_Click()

frmacmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuaccwis_Click()

frmaccwiz.Show

End Sub

Private Sub mnu2ndopr_Click()


'frmprod2nd.Show

frmprod2nd1.Show

End Sub

Private Sub mnuacmas1_Click()

frmoprmas.Show

End Sub

Private Sub mnuadform_Click()

frmadmission.Show

End Sub

Private Sub mnuadwisestudetail_Click()

detail

frmaddetail.Show

End Sub

Private Sub mnuasd_Click()

End Sub
Private Sub mnuar_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\accessionreg.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnubg_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\bloodgroup.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnubirthdays_Click()

frmrptbirthdaylist.Show
End Sub

Private Sub mnucalc_Click()

Dim calc

calc = Shell("c:\sis/calc.exe", 1)

End Sub

Private Sub mnublc_Click()

frmadmres.Show

End Sub

Private Sub mnubreq_Click()

frmbrequ.Show

End Sub

Private Sub mnucategorywiseconcise_Click()

concise

frmcategorywise.Show

End Sub

Private Sub mnucategorywisedetail_Click()

detail
frmcategorywise.Show

End Sub

Private Sub mnuchcertificate_Click()

frmcharacter.Show

End Sub

Private Sub mnuclasswiseconcise_Click()

concise

frmclasswise.Show

End Sub

Private Sub mnuclasswisedetail_Click()

detail

frmclasswise.Show

End Sub

Private Sub mnuclasswiserep_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True
cd.ReportFileName = "c:\gurukul\reports\progressreport.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuclmas_Click()

frmclmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuacenq_Click()

End Sub

Private Sub mnuacrep_Click()

End Sub

Private Sub mnuadd1_Click()

frmsft_a.Show
End Sub

Private Sub mnuadd2_Click()

frmdis_a.Show

End Sub

Private Sub mnuconmas_Click()

frnmachinemas.Show

End Sub

Private Sub mnucsf_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\psalenot.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnudhhn_Click()


frmhnenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnudob_Click()

frmgreeting.Show

End Sub

Private Sub mnudsp_Click()

frmeTSP.Show

End Sub

Private Sub mnudvrs_Click()

frmestat.Show

End Sub

Private Sub mnudvsr_Click()

frmerout.Show

End Sub

Private Sub mnuempmas_Click()


frmempmas.Show

End Sub

Private Sub mnuentrance_Click()

frmsale.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuenttest_Click()

frmenter.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuexammas_Click()

frmexmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnudel1_Click()

frmsft_d.Show

End Sub
Private Sub mnudel2_Click()

frmdis_d.Show

End Sub

Private Sub mnudoc_Click()

End Sub

Private Sub mnuenq1_Click()

frmsft_e.Show

End Sub

Private Sub mnuenq2_Click()

frmdis_e.Show

End Sub

Private Sub mnuexit_Click()

Unload Me

End Sub

Private Sub mnufeemas_Click()


frmitemmas.Show

End Sub

Private Sub mnufeeslip_Click()

frmrptreceipt.Show

End Sub

Private Sub mnugs_Click()

frmgsal.Show

End Sub

Private Sub mnuhchart_Click()

frmhldtl.Show

End Sub

Private Sub mnuhealth_Click()

frmphysic.Show

End Sub

Private Sub mnuhosfur_Click()

frmitemmas.Show
End Sub

Private Sub mnumagiss_Click()

frmmissue.Show

End Sub

Private Sub mnumagrec_Click()

prdcldtl.Show

End Sub

Private Sub mnumagrecst_Click()

frmmrec.Show

End Sub

Private Sub mnumagrecstaff_Click()

mrecsm.Show

'''frmmainmenu.Show

End Sub

Private Sub mnumagstaff_Click()

misstosm.Show
''frmmainmenu.Enabled = False

End Sub

Private Sub mnumarksheet_Click()

frmmarksheet.Show

End Sub

Private Sub mnumusterroll_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\muster.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnunadm_Click()

frmnewad.Show
End Sub

Private Sub mnunews_Click()

frmnews.Show

End Sub

Private Sub mnunsvn_Click()

frmesveh.Show

End Sub

Private Sub mnupayenq_Click()

frmpyenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnupayslips_Click()

frmpayslip.Show

End Sub

Private Sub mnupend_Click()

frmrcptnow.Show
'frmpend.Show

End Sub

Private Sub mnuperiod_Click()

frmprd.Show

'''frmmainmenu.Enabled = False

End Sub

Private Sub mnuprogressdtl_Click()

frmexres.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuprorec_Click()

frmedit.Show

frmedit.Label7(1).Caption = "Serial Number"

frmedit.Label8(1).Caption = "Form Number"

''frmmainmenu.Enabled = False

frmload = "frprosrec"

editme = True
End Sub

Private Sub mnurctpdtl_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.PageZoom (3)

cd.ReportFileName = "c:\gurukul\reports\rcpnodtl.rpt"

'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuregionwiseconcise_Click()

concise

frmregionwise.Show

End Sub

Private Sub mnuregionwisedetail_Click()

detail
frmregionwise.Show

End Sub

Private Sub mnuremc_Click()

frmesdbc.Show

End Sub

Private Sub mnurmas_Click()

frmroute.Show

End Sub

Private Sub mnurooms_Click()

frmhotra.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnurptchcertificate_Click()

frmchrpt.Show

End Sub

Private Sub mnusalary_Click()


frmemptrans.Show

End Sub

Private Sub mnusecmas_Click()

frmscmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusfnr_Click()

frmeFNR.Show

End Sub

Private Sub mnushsn_Click()

frmsnenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusibt_Click()

FRMEBHTI.Show

''frmmainmenu.Enabled = False

End Sub
Private Sub mnusl_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\studentledger.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuslc_Click()

frmslc.Show

End Sub

Private Sub mnuslcrpt_Click()

frmslrpt.Show

End Sub

Private Sub mnusll_Click()

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\gurukul\data\gurukul.mdb;Persist Security Info=False;"

cd.DiscardSavedData = True
cd.ReportFileName = "c:\gurukul\reports\staffledger.rpt"

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnusmas_Click()

frmplace.Show

End Sub

Private Sub mnustreammas_Click()

frmstmas.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnusubjmas_Click()

frmsbmas.Show

''frmmainmenu.Enabled = False

End Sub

Public Sub concise()

state = True
End Sub

Public Sub detail()

state = False

End Sub

Private Sub mnusvhn_Click()

frmvaenq.Show

''frmmainmenu.Enabled = False

End Sub

Private Sub mnuswiz_Click()

frmwizard.Show

End Sub

Private Sub mnutrchecklist_Click()

Modvariables.setname

cd.connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\sisdata\sis.mdb;Persist


Security Info=False;"

cd.DiscardSavedData = True

cd.ReportFileName = "c:\gurukul\reports\transcheck.rpt"
'cd.ParameterFields(0) = ("name;" & Modvariables.schoolname & ";true")

'cd.ParameterFields(1) = ("Receipt No.;" & txtrcpno.Text & ";true")

cd.PrinterSelect

cd.Action = 1

End Sub

Private Sub mnuvdvn_Click()

frmevehi.Show

End Sub

Private Sub mnuvmas_Click()

frmvehicle.Show

End Sub

Private Sub mnuiind1_Click()

Dim iwlot2

iwlot2 = Shell("c:\e-apps\reports\lotnowiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind2_Click()


Dim iwdwpr2

iwdwpr2 = Shell("c:\e-apps\reports\itemwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind3_Click()

Dim mwise2

mwise2 = Shell("c:\e-apps\reports\machinewiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind4_Click()

Dim oprprod2opr

oprprod2opr = Shell("c:\e-apps\reports\operationwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiind6_Click()

Dim oprprod1

oprprod1 = Shell("c:\e-apps\reports\operatorwiseprod2opr.exe", 1)

End Sub

Private Sub mnuiindopr_Click()

frmproduction1.Show
End Sub

Private Sub mnuist1_Click()

Dim iwlot1

iwlot1 = Shell("c:\e-apps\reports\lotnowiseprod1opr.exe", 1)

End Sub

Private Sub mnuist2_Click()

Dim iwdwpr1

iwdwpr1 = Shell("c:\e-apps\reports\itemwiseprod1opr.exe", 1)

End Sub

Private Sub mnuist3_Click()

Dim mwise1

mwise1 = Shell("c:\e-apps\reports\machinewiseprod1opr.exe", 1)

End Sub

Private Sub mnuist4_Click()

Dim operationprod1

operationprod1 = Shell("c:\e-apps\reports\operationwiseprod1opr.exe", 1)

End Sub
Private Sub mnuist6_Click()

Dim opr1prod

opr1prod = Shell("c:\e-apps\reports\opreratorwiseprod1opr.exe", 1)

End Sub

Private Sub mnuistopr_Click()

frmoaschedule_a.Show

End Sub

Private Sub mnuistopr1_Click()

'frmrmmachinejob.Show

End Sub

Private Sub mnuitem1_Click()

Dim itemmas

itemmas = Shell("c:\e-apps\reports\itemmas.exe", 1)

End Sub

Private Sub mnumac_Click()

Dim machinemas
machinemas = Shell("c:\e-apps\reports\machinemas.exe", 1)

End Sub

Private Sub mnumod1_Click()

frmsft_m.Show

End Sub

Private Sub mnumod2_Click()

frmdis_m.Show

End Sub

Private Sub mnuopr1_Click()

Dim oprmas

oprmas = Shell("c:\e-apps\reports\oprmas.exe", 1)

End Sub

Private Sub mnuprodiind_Click()

Dim prodjob2

prodjob2 = Shell("c:\e-apps\reports\productionjobiind.exe", 1)

End Sub
Private Sub mnuprodist_Click()

Dim prodjob1

prodjob1 = Shell("c:\e-apps\reports\productionjobcard.exe", 1)

End Sub

Private Sub mnuprodist1_Click()

frmproduction2.Show

End Sub

Private Sub mnurmret_Click()

frmrmreturn.Show

End Sub

Private Sub mnurmwise_Click()

Dim rawmprod1

rawmprod1 = Shell("c:\e-apps\reports\rawmaterialwiseprod1opr.exe", 1)

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Key

Case "k1":
frmrmmachineissue.Show

Case "k2":

frmprod2nd.Show

Case "k3":

frmproduction2.Show

Case "k4":

frmproduction1.Show

Case "k5":

Unload Me

frmmain.Show

End Select

End Sub
SCREEN OUTPUT

WELCOME FORM
LOGIN FORM
MDI FORM
ITEM MASTER FORM
MACHINE MASTER FORM
SHIFT MASTER FORM
DISPATCH FORM

You might also like