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

📄 frmsell.frm

📁 一个小型的进销存管理软件,数据采用ACCE
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      Caption         =   "Label6"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   1560
      TabIndex        =   13
      Top             =   7680
      Width           =   810
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "合计金额:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   3600
      TabIndex        =   12
      Top             =   7680
      Width           =   1275
   End
   Begin VB.Label lblJE 
      AutoSize        =   -1  'True
      Caption         =   "Label7"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   4920
      TabIndex        =   11
      Top             =   7680
      Width           =   810
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "合计税额:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   6600
      TabIndex        =   10
      Top             =   7680
      Width           =   1275
   End
   Begin VB.Label lblSE 
      AutoSize        =   -1  'True
      Caption         =   "Label8"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   7920
      TabIndex        =   9
      Top             =   7680
      Width           =   810
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "金税合计:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   9360
      TabIndex        =   8
      Top             =   7680
      Width           =   1275
   End
   Begin VB.Label lblJSHJ 
      AutoSize        =   -1  'True
      Caption         =   "Label9"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   10680
      TabIndex        =   7
      Top             =   7680
      Width           =   810
   End
   Begin VB.Label TxtSHR 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   300
      Left            =   2040
      TabIndex        =   6
      Top             =   960
      Width           =   2775
   End
   Begin VB.Label LblFPHM 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   9960
      TabIndex        =   5
      Top             =   960
      Width           =   1815
   End
   Begin VB.Line Line1 
      X1              =   120
      X2              =   11880
      Y1              =   7560
      Y2              =   7560
   End
   Begin VB.Line Line2 
      X1              =   120
      X2              =   11880
      Y1              =   8040
      Y2              =   8040
   End
   Begin VB.Line Line3 
      X1              =   120
      X2              =   120
      Y1              =   7560
      Y2              =   8040
   End
   Begin VB.Line Line4 
      X1              =   11880
      X2              =   11880
      Y1              =   7560
      Y2              =   8040
   End
End
Attribute VB_Name = "FrmSELL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Number As Integer
Dim gRow As Integer
Dim gCol As Integer
Dim KPRQ As String
Dim ButtonFlag As Integer
Dim XSDExcel As Excel.Application
Private Sub Command2_Click()
    KHFlag = 2
    FrmKH.Show 1
    Grid.SetFocus
End Sub
Private Sub DTPicker1_Change()
    KPRQ = DTPicker1.Value
    Call FPHM
End Sub

Private Sub Form_Load()
Dim Rst As ADODB.Recordset
Dim SQL As String

    DTPicker1.Value = Date$
    Text1.Visible = False
    'Toolbar1.Buttons.Item(5).Enabled = False
    Set IDlist = New Collection
    Call ReSet
    
    KPRQ = Date$
    
    Call FPHM
    
End Sub
Sub FPHM()

    Set Rst = New ADODB.Recordset
        SQL = "select max(fphm) from XSD_ZB where fphm like '" & Format(KPRQ, "yymmdd") & "%'"
        Rst.CursorLocation = adUseClient
        Rst.Open SQL, db, adOpenDynamic, adLockReadOnly, adCmdText
        
    If IsNull(Rst.Fields(0)) Then
      Number = 1
    Else
      Number = Val(Mid(Rst.Fields(0), 8)) + 1
    End If
    Rst.Close
    Set Rst = Nothing
    
    LblFPHM.Caption = Format(KPRQ, "yymmdd") & Format(CStr(Number), "000")
End Sub
Private Sub ReSet()
  Grid.Clear
  Grid.Rows = 1
  Grid.FormatString = "序号|^  商  品  名  称   |^ 货  号 |^ 规  格  |^ 单  位 |^ 数  量 |^ 单  价 |^ 金   额  |^ 税  率  |^ 税  额  |^ 金 税 合 计| SPID"
  Grid.ColWidth(11) = 0
  TxtSHR.Caption = ""
  lblSL.Caption = "0"
  lblJE.Caption = "0.00"
  lblSE.Caption = "0.00"
  lblJSHJ.Caption = "0.00"
  
 Set IDlist = New Collection
  
  Grid.Enabled = True
End Sub
Private Sub Grid_DblClick()
    If Grid.Rows = 1 Then Exit Sub

    Text1.Top = Grid.CellTop + Grid.Top
    Text1.Left = Grid.CellLeft + Grid.Left
    
    gRow = Grid.Row
    gCol = Grid.Col
    
    If gCol <> 5 And gCol <> 6 And gCol <> 8 Then Exit Sub
    
    Text1.Width = Grid.CellWidth '- 2 * Screen.TwipsPerPixelX
    Text1.Height = Grid.CellHeight ' - 2 * Screen.TwipsPerPixelY
     
    Text1.Text = Grid.Text
    ' Show the text box:
    Text1.Visible = True
    Text1.ZOrder 0 ' 把 Text1 放到最前面!
    Text1.SetFocus
    ' Redirect this KeyPress event to the text box:
    If KeyAscii <> 13 Then
        SendKeys Chr$(KeyAscii)
    End If
        
End Sub
Private Sub Text1_GotFocus()
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Grid.SetFocus ' Set focus back to grid, see Text_LostFocus.
        KeyAscii = 0 ' Ignore this KeyPress.
    End If
    If KeyAscii <> 8 And KeyAscii <> 45 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then
           ' 'Beep
        KeyAscii = 0
    End If
End Sub
Private Sub Grid_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Call Grid_DblClick
    End If
End Sub

⌨️ 快捷键说明

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