home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / Accounting1980933172006.psc / AsOnProfit.frm < prev    next >
Text File  |  2006-03-18  |  6KB  |  202 lines

  1. VERSION 5.00
  2. Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
  3. Begin VB.Form AsOnProfit 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Profit and Loss Account"
  6.    ClientHeight    =   3060
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   4380
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3060
  14.    ScaleWidth      =   4380
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CommandButton OKButton 
  18.       Caption         =   "OK"
  19.       Default         =   -1  'True
  20.       Height          =   300
  21.       Left            =   870
  22.       TabIndex        =   0
  23.       Top             =   2460
  24.       Width           =   1095
  25.    End
  26.    Begin VB.CommandButton CancelButton 
  27.       Cancel          =   -1  'True
  28.       Caption         =   "Cancel"
  29.       Height          =   300
  30.       Left            =   2295
  31.       TabIndex        =   1
  32.       Top             =   2460
  33.       Width           =   1095
  34.    End
  35.    Begin VB.Frame FrameSelect 
  36.       Height          =   1950
  37.       Left            =   300
  38.       TabIndex        =   2
  39.       Top             =   180
  40.       Width           =   3570
  41.       Begin VB.TextBox txtSTOCK 
  42.          DataField       =   "balance"
  43.          BeginProperty DataFormat 
  44.             Type            =   1
  45.             Format          =   "0.00"
  46.             HaveTrueFalseNull=   0
  47.             FirstDayOfWeek  =   0
  48.             FirstWeekOfYear =   0
  49.             LCID            =   2057
  50.             SubFormatType   =   1
  51.          EndProperty
  52.          BeginProperty Font 
  53.             Name            =   "Courier New"
  54.             Size            =   12
  55.             Charset         =   0
  56.             Weight          =   400
  57.             Underline       =   0   'False
  58.             Italic          =   0   'False
  59.             Strikethrough   =   0   'False
  60.          EndProperty
  61.          Height          =   390
  62.          Left            =   1440
  63.          MaxLength       =   11
  64.          TabIndex        =   5
  65.          Top             =   1140
  66.          Width           =   1935
  67.       End
  68.       Begin MSMask.MaskEdBox mskToDt 
  69.          Height          =   390
  70.          Left            =   1440
  71.          TabIndex        =   3
  72.          Top             =   420
  73.          Width           =   1935
  74.          _ExtentX        =   3413
  75.          _ExtentY        =   688
  76.          _Version        =   393216
  77.          MaxLength       =   10
  78.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  79.             Name            =   "Courier New"
  80.             Size            =   12
  81.             Charset         =   0
  82.             Weight          =   400
  83.             Underline       =   0   'False
  84.             Italic          =   0   'False
  85.             Strikethrough   =   0   'False
  86.          EndProperty
  87.          Format          =   "dd/mm/yyyy"
  88.          Mask            =   "##/##/####"
  89.          PromptChar      =   "_"
  90.       End
  91.       Begin VB.Label Label1 
  92.          AutoSize        =   -1  'True
  93.          Caption         =   "Closing Stock  :  "
  94.          Height          =   195
  95.          Left            =   180
  96.          TabIndex        =   6
  97.          Top             =   1245
  98.          Width           =   1200
  99.       End
  100.       Begin VB.Label Label2 
  101.          AutoSize        =   -1  'True
  102.          Caption         =   "As On   :   "
  103.          Height          =   195
  104.          Left            =   180
  105.          TabIndex        =   4
  106.          Top             =   525
  107.          Width           =   750
  108.       End
  109.    End
  110. End
  111. Attribute VB_Name = "AsOnProfit"
  112. Attribute VB_GlobalNameSpace = False
  113. Attribute VB_Creatable = False
  114. Attribute VB_PredeclaredId = True
  115. Attribute VB_Exposed = False
  116. Option Explicit
  117. '***********************************************
  118. 'This Software is developed by craceinfotech.
  119. 'Web site : http://www.craceinfotech.com
  120. 'email    : craceinfotech.yahoo.com
  121. 'date     : 18.03.2006
  122. '***********************************************
  123.  
  124. Private Sub CancelButton_Click()
  125.     mskToDt.Text = Format(ToDate, "dd/mm/yyyy")
  126.     ContinueProcess = False
  127.     Unload Me
  128. End Sub
  129.  
  130. Private Sub Form_Activate()
  131.        txtSTOCK = Format(StockInHand, "0.00")
  132.        txtSTOCK = Format(Format(Val(txtSTOCK), "0.00"), "@@@@@@@@@@@")
  133.        mskToDt.SetFocus
  134. End Sub
  135.  
  136. Private Sub Form_Load()
  137.     mskToDt.Text = Format(ToDate, "dd/mm/yyyy")
  138. End Sub
  139.  
  140. Private Sub mskToDt_GotFocus()
  141.     mskToDt.SelStart = 0
  142.     mskToDt.SelLength = Len(mskToDt.Text)
  143. End Sub
  144.  
  145. Private Sub mskToDt_Validate(Cancel As Boolean)
  146.     If Not IsDate(mskToDt.Text) Then
  147.         MsgBox "Enter a Date"
  148.         Cancel = True
  149.     End If
  150. End Sub
  151.  
  152. Private Sub OKButton_Click()
  153.     If Not IsDate(mskToDt.Text) Then
  154.         MsgBox "Enter a valid To date"
  155.         Exit Sub
  156.     End If
  157.         
  158.     If mskToDt.Text >= StartDate And mskToDt.Text <= EndDate And mskToDt.Text <= SystemDate Then
  159.         ToDate = mskToDt.Text
  160.         FromDate = StartDate
  161.     Else
  162.         MsgBox "Enter a Valid To Date"
  163.         mskToDt.SetFocus
  164.         Exit Sub
  165.     End If
  166.     StockInHand = Format(Val(txtSTOCK), "0.00")
  167.     UpdateStock
  168.     ContinueProcess = True
  169.     Me.Hide
  170.     
  171.     Profit1.Show 1
  172.     If ContinueProcess Then
  173.         Me.Show 1
  174.     End If
  175.  
  176. End Sub
  177.  
  178. Private Sub txtstock_GotFocus()
  179. txtSTOCK = Format(Val(txtSTOCK), "0.00")
  180. txtSTOCK.SelStart = 0
  181. txtSTOCK.SelLength = Len(txtSTOCK)
  182. End Sub
  183.  
  184. Private Sub txtstock_KeyPress(KeyAscii As Integer)
  185.     If (KeyAscii = vbKeyBack) Then Exit Sub
  186.     If InStr("1234567890.", Chr(KeyAscii)) = 0 Then KeyAscii = 0
  187. End Sub
  188.  
  189. Private Sub txtstock_LostFocus()
  190. txtSTOCK = Format(Format(Val(txtSTOCK), "0.00"), "@@@@@@@@@@@")
  191. End Sub
  192.  
  193. Private Sub txtstock_Validate(Cancel As Boolean)
  194.  
  195. If IsNumeric(txtSTOCK) = False Then
  196.     MsgBox "Enter Zero or a valid Positive number"
  197.     Cancel = True
  198. End If
  199.  
  200. End Sub
  201.  
  202.