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

📄 sale able stock rep.frm

📁 This project is to design the automated system for the inventory of Al-Ahmad Cotton and Oil Mills si
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form42 
   BackColor       =   &H80000013&
   Caption         =   "Saleable Stock Report"
   ClientHeight    =   5700
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7515
   LinkTopic       =   "Form42"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5700
   ScaleWidth      =   7515
   StartUpPosition =   1  'CenterOwner
   Begin VB.Frame Frame4 
      BackColor       =   &H80000013&
      Height          =   735
      Left            =   1185
      TabIndex        =   6
      Top             =   3840
      Width           =   3615
      Begin VB.CommandButton Command1 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Caption         =   "Preview"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   240
         Width           =   1575
      End
      Begin VB.CommandButton Command2 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Caption         =   "Cancel"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1800
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   240
         Width           =   1575
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H80000013&
      Height          =   2175
      Left            =   465
      TabIndex        =   1
      Top             =   1320
      Width           =   5415
      Begin VB.ComboBox prodname 
         Height          =   315
         ItemData        =   "Sale able stock Rep.frx":0000
         Left            =   2760
         List            =   "Sale able stock Rep.frx":0010
         TabIndex        =   2
         Top             =   480
         Width           =   1575
      End
      Begin MSComCtl2.DTPicker date 
         Height          =   375
         Left            =   2760
         TabIndex        =   3
         Top             =   1440
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64225281
         CurrentDate     =   38320
      End
      Begin VB.Label Label3 
         BackColor       =   &H80000013&
         Caption         =   "Product Name"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   960
         TabIndex        =   5
         Top             =   480
         Width           =   1695
      End
      Begin VB.Label Label2 
         BackColor       =   &H80000013&
         Caption         =   "Date"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   960
         TabIndex        =   4
         Top             =   1440
         Width           =   1695
      End
   End
   Begin VB.TextBox prodid 
      Height          =   375
      Left            =   5025
      TabIndex        =   0
      Top             =   4080
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Image Image3 
      Height          =   675
      Left            =   5840
      Picture         =   "Sale able stock Rep.frx":0040
      Top             =   4570
      Width           =   690
   End
   Begin VB.Label Label4 
      BackColor       =   &H80000013&
      Height          =   4695
      Left            =   6000
      TabIndex        =   10
      Top             =   0
      Width           =   375
   End
   Begin VB.Image Image2 
      Height          =   765
      Left            =   -840
      Picture         =   "Sale able stock Rep.frx":191E
      Top             =   5120
      Width           =   6960
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000013&
      Caption         =   "Saleable Stock Information"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   20.25
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   705
      TabIndex        =   9
      Top             =   360
      Width           =   4815
   End
   Begin VB.Image Image1 
      Height          =   5760
      Left            =   6105
      Picture         =   "Sale able stock Rep.frx":12EB0
      Top             =   0
      Width           =   1440
   End
End
Attribute VB_Name = "Form42"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
If prodname.Text = "" Then
MsgBox "Please Select the Product Name"
Exit Sub
End If

'////////////////////////////
If prodid.Text = 3 Then
If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT * from Stock2 where Prod_Id='" & Val(prodid.Text) & "' and Tras_Date<='" & Date & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Stock is not Present"
Else
Set Form16.report = New CrystalReport25
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If

'////////////////////////////
If prodid.Text = 4 Then
If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT * from Stock2 where Prod_Id='" & Val(prodid.Text) & "' and Tras_Date<='" & Date & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Stock is not Present"
Else
Set Form16.report = New CrystalReport26
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If

'////////////////////////////
If prodid.Text = 6 Then
If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT * from Stock2 where Prod_Id='" & Val(prodid.Text) & "' and Tras_Date<='" & Date & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Stock is not Present"
Else
Set Form16.report = New CrystalReport27
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
'////////////////////////////
If prodid.Text = 7 Then
If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT * from Stock2 where Prod_Id='" & Val(prodid.Text) & "' and Tras_Date<='" & Date & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Stock is not Present"
Else
Set Form16.report = New CrystalReport28
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
'////////////////////////////

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
If cnn.State = adStateOpen Then cnn.Close
cnn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=hussain"
'date.Value = Now
End Sub

Private Sub prodname_Click()

If Trim(prodname.Text) = "Del Cotton" Then
prodid.Text = 3
End If
If Trim(prodname.Text) = "Oil Cake" Then
prodid.Text = 4
End If
If Trim(prodname.Text) = "Refine Oil" Then
prodid.Text = 6
End If
If Trim(prodname.Text) = "Dirt Oil" Then
prodid.Text = 7
End If

End Sub

⌨️ 快捷键说明

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