Дипломная работа: Автошкола "Кадиллак"
End Sub
Кнопка “Добавить клиента ”:
Private Sub bt_newclient_Click()
ClientForm.Hide
AddClientForm.Show (0)
End Sub
Кнопка “Информация о клиенте”:
PrivateSubbt_showsuc_Click()
ClientForm.Hide
SelectForm.Show (0)
End Sub
Кнопка “Допуски ”:
Private Sub bt_waydata_Click()
ClientForm.Hide
WayForm.Show (0)
End Sub
Завершение работы формы :
Private Sub UserForm_Terminate()
MainForm.Show (0)
End Sub
5.6 Форма “Добавление клиента”
Кнопка “Внести в базу данных!”:
Private Sub bt_add_Click()
On Error GoTo erin:
If ed_surname.Text <> "" And ed_name.Text <> "" And ed_patron.Text <> "" And ed_birth.Text <> "" And ed_str.Text <> "" And ed_home.Text <> "" And ed_room.Text <> "" And ed_who.Text <> "" And ed_date.Text <> "" And ed_ser.Text <> "" And ed_num.Text <> "" And Val(ed_home.Text) <> 0 And Val(ed_room.Text) <> 0 And Val(ed_ser.Text) <> 0 And Val(ed_num.Text) <> 0 And Val(ed_birth.Text) <> 0 And Val(ed_date.Text) <> 0 And ed_birth.Text = CDate(ed_birth.Text) And ed_date.Text = CDate(ed_date.Text) Then
Dim all As Integer
Sheets("База").Activate
Sheets("База").Cells(1, 1).Select
Selection.CurrentRegion.Select
all = Selection.CurrentRegion.Rows.Count