Err.Clear
Case Else
MsgBox Err.Description, vbCritical
End Select
End Sub
' Create tables
Sub CreateTables()
Call CreateTable1 'Formyl_r
Call CreateTable2 'Sotrydniki
Call CreateTable3 'Chitayel_
Call CreateTable4 'Chitateli
Call CreateTable5 'Chitat_zal
Call CreateTable6 'chitatel_v_zale
Call CreateTable7 'Znania
Call CreateTable8 'Ekzempl_knigi
Call CreateTable9 'Kniga_jyrnal_
Call CreateTable10 'Gazeta
Call CreateTable11 'Podchivka
Call CreateTable12 'Polka
End Sub
'=== Create table Formyl_r ======
Sub CreateTable1()
Set tdf = dbs.CreateTableDef( "Formyl_r" )
Call AddFieldToTable("Chet_k", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("n_chit_bileta", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("Invent_n", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("Data_v", dbDate, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("Data_vozvrata", dbDate, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("ID_vidavchego_sotryd", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("ID_sotrydnika", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
dbs.TableDefs.Append tdf
End Sub
'=== Create table Sotrydniki ======
Sub CreateTable2()
Set tdf = dbs.CreateTableDef( "Sotrydniki" )
Call AddFieldToTable("ID_sotrydnika", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("ID_zala", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("ID_abonimenta", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("FIO", dbText, 30, 0, "", "", "", FALSE, FALSE )
dbs.TableDefs.Append tdf
End Sub
'=== Create table Chitayel_ ======
Sub CreateTable3()
Set tdf = dbs.CreateTableDef( "Chitayel_" )
Call AddFieldToTable("n_chit_bileta", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("ID_kategorii", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("n_biblioteki", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("FIO", dbText, 30, 0, "", "", "", FALSE, FALSE )
dbs.TableDefs.Append tdf
End Sub
'=== Create table Chitateli ======
Sub CreateTable4()
Set tdf = dbs.CreateTableDef( "Chitateli" )
Call AddFieldToTable("ID_kategorii", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("nazvanie_kategorii", dbText, 20, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("primechanie", dbText, 20, 0, "", "", "", FALSE, FALSE )
dbs.TableDefs.Append tdf
End Sub
'=== Create table Chitat_zal ======
Sub CreateTable5()
Set tdf = dbs.CreateTableDef( "Chitat_zal" )
Call AddFieldToTable("ID_zala", dbInteger, 0, 0, "", "", "", TRUE, FALSE )
Call AddFieldToTable("n_zala", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
Call AddFieldToTable("n_biblioteki", dbInteger, 0, 0, "", "", "", FALSE, FALSE )
dbs.TableDefs.Append tdf
End Sub
'=== Create table chitatel_v_zale ======
Sub CreateTable6()
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.