ATM Sreen Sorts

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

ATM

SREEN SORTS:
FORM1:
Private Sub Command1_Click()

Form2.Show

Me.Hide

End Sub

Private Sub Command2_Click()

End

End Sub

FORM2:
Dim db As Database

Dim rs As Recordset

Dim b As Integer
Private Sub Command1_Click()

b = InputBox(Text1.Text)

rs.MoveFirst

Do While Not rs.EOF()

If rs.Fields(0) = Val(b) Then

Label2.Visible = True

Label3.Visible = True

Text1.Visible = True

Text2.Visible = True

Call disp

Command1.Visible = False

Command3.Visible = True

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF() Then

MsgBox "record not found"

End If

End Sub

Private Sub Command2_Click()

Form1.Show

End Sub
Private Sub Command3_Click()

Form3.Show

End Sub

Private Sub Form_Load()

Set db = DBEngine.OpenDatabase("d:\form2.mdb")

Set rs = db.OpenRecordset("fm2")

Label2.Visible = False

Label3.Visible = False

Text1.Visible = False

Text2.Visible = False

Command3.Visible = False

End Sub

Public Sub disp()

Text1.Text = rs.Fields(0)

Text2.Text = rs.Fields(1)

End Sub

FORM3:

Private Sub Command1_Click()

Form4.Show

Me.Hide

End Sub

Private Sub Command2_Click()

Form6.Show
Me.Hide

End Sub

Private Sub Command3_Click()

Form7.Show

Me.Hide

End Sub

Private Sub Command4_Click()

End

End Sub

FORM4:

Dim db As Database

Dim rs As Recordset

Private Sub Command1_Click()

rs.AddNew

rs.Fields(0) = Text1.Text

rs.Fields(1) = Text2.Text

rs.Update

MsgBox "deposited"

End Sub

Private Sub Command2_Click()

Text1.Text = ""

Text2.Text = ""
Form3.Show

End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\form4.mdb")

Set rs = db.OpenRecordset("fm4")

End Sub

“FORM5 NO NEED”

FORM6:

Dim db As Database

Dim rs As Recordset

Dim b As Integer

Private Sub Command1_Click()

b = InputBox(Text1.Text)

rs.MoveFirst

Do While Not rs.EOF()

If rs.Fields(0) = Val(b) Then

Call disp

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF() Then

MsgBox "record not found"

End If
End Sub

Private Sub Command2_Click()

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Form3.Show

End Sub

Private Sub Command3_Click()

Text4.Text = Text2.Text - Text3.Text

End Sub

Private Sub Command4_Click()

rs.Edit

rs.Fields(0) = Text1.Text

rs.Fields(1) = Text4.Text

rs.Update

MsgBox "updated"

End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\form4.mdb")

Set rs = db.OpenRecordset("fm4")

End Sub
Public Sub disp()

Text1.Text = rs.Fields(0)

Text2.Text = rs.Fields(1)

End Sub

FORM7:

Dim db As Database

Dim rs As Recordset

Dim b As Integer

Private Sub Command1_Click()

DataReport1.Show

End Sub

Private Sub Command2_Click()

Text1.Text = ""

Text3.Text = ""

Form3.Show

End Sub
Private Sub Command3_Click()

b = InputBox(Text1.Text)

rs.MoveFirst

Do While Not rs.EOF()

If rs.Fields(0) = Val(b) Then

Call disp

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF() Then

MsgBox "record not found"

End If

End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\form4.mdb")

Set rs = db.OpenRecordset("fm4")

End Sub

Public Sub disp()

Text1.Text = rs.Fields(0)

Text3.Text = rs.Fields(1)

End Sub

You might also like