⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saleg.frm

📁 nice proggy nnnnnnnnnnnnnn
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   5895
      TabIndex        =   29
      Top             =   5745
      Width           =   570
   End
   Begin VB.Label Label10 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Rate"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   6450
      TabIndex        =   28
      Top             =   5760
      Width           =   960
   End
   Begin VB.Label Label9 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Item Code"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   2355
      TabIndex        =   27
      Top             =   5730
      Width           =   1230
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Amount"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   8370
      TabIndex        =   26
      Top             =   5745
      Width           =   945
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Rebate"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   7410
      TabIndex        =   25
      Top             =   5745
      Width           =   990
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Model"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   4635
      TabIndex        =   24
      Top             =   5760
      Width           =   1245
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Item Name"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   3585
      TabIndex        =   23
      Top             =   5730
      Width           =   1035
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "A/C ID."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   225
      Left            =   375
      TabIndex        =   22
      Top             =   5715
      Width           =   1050
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C0E0FF&
      Height          =   225
      Left            =   1185
      TabIndex        =   20
      Top             =   6480
      Width           =   2925
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "DATE"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   270
      Left            =   360
      TabIndex        =   13
      Top             =   135
      Width           =   795
   End
End
Attribute VB_Name = "saleg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Text2 = Combo1.Text
Adodc2.RecordSource = "select * from accounts where ac_name = '" + Combo1.Text + "'"
Adodc2.Refresh
Label2 = "Previous Balance : " + Str(Adodc2.Recordset.Fields("Balance"))


End Sub

Private Sub Command1_Click()
Adodc1.RecordSource = "select * from trans where date = cdate('" + Text1 + "')"
Adodc1.Refresh
DataGrid1.Refresh
Frame1.Visible = True
End Sub

Private Sub Command11_Click()
MAIN.Show
MAIN.Enabled = True
Unload Me
End Sub

Private Sub Command2_Click()
'<--------------------SAVING INTO TRANS-------------------->
Adodc1.Recordset.AddNew
    
    Adodc1.Recordset.Fields("Date") = CDate(Text1)
    Adodc1.Recordset.Fields("ac_name") = Text2.Text
    Adodc1.Recordset.Fields("billno") = Text3.Text
    Adodc1.Recordset.Fields("item_code") = Text4.Text
    Adodc1.Recordset.Fields("g_head") = Text14.Text
    Adodc1.Recordset.Fields("item") = Text5.Text
    Adodc1.Recordset.Fields("model") = Text6.Text
    Adodc1.Recordset.Fields("qty") = Val(Text8.Text)
    Adodc1.Recordset.Fields("rate") = Val(Text7.Text)
    Adodc1.Recordset.Fields("rebate") = Val(Text9.Text)
    Adodc1.Recordset.Fields("Amount") = Val(Text10.Text)
    Adodc1.Recordset.Fields("Paid") = Val(Text12.Text)
    Adodc1.Recordset.Fields("Balance") = Val(Text13.Text)
    
Adodc1.Recordset.Update
'<------------------------------------------------------------->
'<---------------Reducing the Stock---------------
    Adodc5.RecordSource = "select * from stock where item_code = '" + Text4 + "'"
    Adodc5.Refresh
    Adodc5.Recordset.Fields("QOH") = Adodc5.Recordset.Fields("QOH") - Adodc1.Recordset.Fields("qty")
    Adodc5.Recordset.Update
'<-----------------end of red. of stock--------------
'<------------------Change the Balance Amt.(if applicable)----?
    If Val(Text13.Text) > 0 Then
        Adodc2.RecordSource = "select * from accounts where ac_name = '" + Text2.Text + "'"
        Adodc2.Refresh
        Adodc2.Recordset.Fields("balance") = Adodc2.Recordset.Fields("balance") + Val(Text13.Text)
        Adodc2.Recordset.Update
    End If
'<----------------------------End------------------------->







'-----------clear the textboxes-------------
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""

Text12 = ""
Text13 = ""

Me.Tag = ""
Call Form_Activate

Label8 = ""
End Sub

Private Sub DTPicker1_Change()
Text1 = DTPicker1.Value
End Sub

Private Sub Form_Activate()
If Me.Tag = "" Then
    DTPicker1.Value = Date
    Text1 = Date
    Combo1.Clear
    While Not Adodc2.Recordset.EOF
        Combo1.AddItem Adodc2.Recordset.Fields("Ac_name")
        Adodc2.Recordset.MoveNext
    Wend
    Combo1.SetFocus
End If
    If Me.Tag = "called" Then
        Text8 = "1"
        Text8.SelStart = 0
        Text8.SelLength = Len(Text8) - 1
        Text8.SetFocus
    End If

End Sub

Private Sub Text12_Change()
Text13 = Val(Text10) - Val(Text12)
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    items.Tag = "saleg"
    items.Show
    Me.Tag = "called"
    Me.Enabled = False
End If
End Sub

Private Sub Text8_Change()
Text10 = Val(Text8) * Val(Text7)
Text13 = Text10
End Sub

Private Sub Text9_Change()
Text10 = Val(Text8) * Val(Text7) - Val(Text9)
Text13 = Val(Text10) - Val(Text9)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -