Автоматизация учета основных средств на предприятии

Private Const cFirmReq As Byte = 1

Private Const rFirmReq As Integer = 13

Private Const cOsn As Byte = 18

Private Const rOsn As Integer = 25

Private Const cDatPriem As Byte = 88

Private Const rDatPriem As Integer = 28

Private Const cSchet As Byte = 88

Private Const rSchet As Integer = 30

Private Const cAmort As Byte = 88

Private Const rAmort As Integer = 32

Private Const cInv As Byte = 88

Private Const rInv As Integer = 33

Private Const cNomer As Byte = 36

Private Const rNomer As Integer = 32

Private Const cDat As Byte = 49

Private Const rDat As Integer = 32

Private Const cTovar As Byte = 15

Private Const rTovar As Integer = 36

Private Const cMest As Byte = 29

Private Const rMest As Integer = 39

Private Const cPerv As Byte = 65

Private Const rPerv As Integer = 13

Private Const cSrok As Byte = 73

Private Const rSrok As Integer = 13

Private Const cType As Byte = 81

Private Const rType As Integer = 13

Private Const cName2 As Byte = 1

Private Const rName2 As Integer = 24

Private Const cKol As Byte = 37

Private Const rKol As Integer = 24

Private Const cDatIspDay As Byte = 20

Private Const rDatIspDay As Integer = 3

Private Const cDatIspMon As Byte = 24

Private Const rDatIspMon As Integer = 3

Private Const cDatIspYear As Byte = 37

Private Const rDatIspYear As Integer = 3

Private Const cSootv1 As Byte = 31

Private Const rSootv1 As Integer = 5

Private Const cSootv2 As Byte = 31

Private Const rSootv2 As Integer = 6

Private Const cDorab1 As Byte = 57

Private Const rDorab1 As Integer = 5

Private Const cDorab2 As Byte = 57

Private Const rDorab2 As Integer = 6

Private Const cSootvInf As Byte = 1

Private Const rSootvInf As Integer = 7

Private Const cDorabInf As Byte = 51

Private Const rDorabInf As Integer = 7

Private Const cResult As Byte = 13

Private Const rResult As Integer = 11

Private Const cTDoc As Byte = 22

Private Const rTDoc As Integer = 13

Private Const cPredsDolzh As Byte = 15

Private Const rPredsDolzh As Integer = 14

Private Const cChl1Dolzh As Byte = 15

Private Const rChl1Dolzh As Integer = 16

Private Const cChl2Dolzh As Byte = 15

Private Const rChl2Dolzh As Integer = 18

Private Const cPredsName As Byte = 49

Private Const rPredsName As Integer = 14

Private Const cChl1Name As Byte = 49

Private Const rChl1Name As Integer = 16

Private Const cChl2Name As Byte = 49

Private Const rChl2Name As Integer = 18

Private Const cPrinDolzh As Byte = 56

Private Const rPrinDolzh As Integer = 24

Private Const cPrinName As Byte = 85

Private Const rPrinName As Integer = 24

Private Const cDatPrinDay As Byte = 52

Private Const rDatPrinDay As Integer = 27

Private Const cDatPrinMon As Byte = 56

Private Const rDatPrinMon As Integer = 27

Private Const cDatPrinYear As Byte = 69

Private Const rDatPrinYear As Integer = 27

Private Const cDatDovDay As Byte = 63

Private Const rDatDovDay As Integer = 28

Private Const cDatDovMon As Byte = 67

Private Const rDatDovMon As Integer = 28

Private Const cDatDovYear As Byte = 80

Private Const rDatDovYear As Integer = 28

Private Const cDatDovNomer As Byte = 85

Private Const rDatDovNomer As Integer = 28

Private Const cDatDovOsn As Byte = 57

Private Const rDatDovOsn As Integer = 29

Private Const cXranDolzh As Byte = 51

Private Const rXranDolzh As Integer = 32

Private Const cXranName As Byte = 80

Private Const rXranName As Integer = 32

Private Const cDatXranDay As Byte = 52

Private Const rDatXranDay As Integer = 35

Private Const cDatXranMon As Byte = 56

Private Const rDatXranMon As Integer = 35

Private Const cDatXranYear As Byte = 69

Private Const rDatXranYear As Integer = 35

Private Const cXranNomer As Byte = 85

Private Const rXranNomer As Integer = 34

Private Const cNomer2 As Byte = 80

Private Const rNomer2 As Integer = 39

Private Const cDatSost As Byte = 90

Private Const rDatSost As Integer = 39

Private Const cBuchName As Byte = 75

Private Const rBuchName As Integer = 41

Sub PrintFormOS1 (ByVal nomer As Long)

Dim db As Database, Rec As DAO. Recordset, RecList As DAO. Recordset

Dim oApp As Object

Dim StrFormName As String

Dim StrFile As String, s_folder As String, StrPath As String

Dim StrGlBuch As String

Dim StrFirmName As String, StrFirmOKPO As String, StrFirmAddr As String, StrFirmReq As String

Dim StrRukName As String, StrRukDolzh As String

Dim StrDatePodp As Date, StrDatePriem As Date, StrDate As Date, StrDateIsp As Date, StrPrinDate As Date, StrDovDate As Date, StrXranDate As Date

Dim StrOsn As String, StrSchet As String, StrAmort As String

Dim NomerVnutr As String, StrTovar As String

Dim StrInv As String

Dim StrStoim As Double, StrSroki As Long

Dim StrMethod As String, StrMest As String

Dim StrKol As Long

Dim vbSootv As Boolean, vbDorab As Boolean

Dim StrSootv As String, StrDorab As String

Dim StrZakl As String, StrTechDoc As String

Dim StrPredsName As String, StrPredsDolzh As String

Dim StrChl1Name As String, StrChl1Dolzh As String

Dim StrChl2Name As String, StrChl2Dolzh As String

Dim StrPrinName As String, StrPrinDolzh As String

Dim StrDovFor As String, StrDovNom As String

Dim StrXranName As String, StrXranDolzh As String, StrXranNomer As String

Dim StrMonthPodp As String, StrMonthIsp As String, StrMonthPrin As String, StrMonthDov As String, StrMonthXran As String

On Error GoTo LblErr

If nomer = 0 Then Exit Sub

s_folder = CurrentProject. Path

If Right$ (s_folder,

1) <> "\" Then s_folder = s_folder + "\"

s_folder = s_folder + "blanks\"

If Len (Dir$ (s_folder, vbDirectory)) = 0 Then

MsgBox "Путь к папке с бланками " & s_folder & " не обнаружен!", vbCritical + vbOKOnly

Exit Sub

End If

Set db = CurrentDb

Set Rec = db. OpenRecordset ("select * from Формы where НомерФорма = " & NomerForm, dbOpenSnapshot)

If Rec. RecordCount > 0 Then

StrFormName = Rec. Fields ("Наименование"). Value

StrFile = Rec. Fields ("Файл"). Value

Else

Set Rec = Nothing

MsgBox "Нет информации о форме №" & NomerForm & "!", vbCritical + vbOKOnly

Exit Sub

End If

Set Rec = Nothing

StrPath = s_folder + StrFile

If Len (Dir$ (StrPath)) = 0 Then

MsgBox "Файл бланка формы '" & StrFormName & "' " & StrPath & " не обнаружен!", vbCritical + vbOKOnly

Exit Sub

End If

Set Rec = db. OpenRecordset ("SELECT Параметры. *, Сотрудники. Сотрудник FROM Сотрудники INNER JOIN Параметры ON Сотрудники. НомерСотр = Параметры. ГлБухгалтер", dbOpenSnapshot)

Страница:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15 
 16  17  18  19  20  21  22  23  24  25  26  27  28  29  30 
 31  32  33  34  35  36  37  38  39  40  41  42 


Другие рефераты на тему «Программирование, компьютеры и кибернетика»:

Поиск рефератов

Последние рефераты раздела

Copyright © 2010-2024 - www.refsru.com - рефераты, курсовые и дипломные работы