Thursday, November 6, 2008
Rushhhh
wah ytd so stress.... play play till like 12 am.... then found out i left all my hmk in school... so cannot do... thn thought em by today... then morn i rmbred i got my "bro's" TYS... so i quickly do.... haizz.... went out with jwk syu amr syk and jwk's bro/bf xD. talk talk. crap crap. gossip gossip. laugh laugh. then aft finish am ler... from library go back to sch. pass up my am which is like 30 hours late... then tmr still have to meet ms how bro.... great... now i got ppl wit same taste as me... muahahaha


CS OMG LIKE SOO FREAKING HARD!@!@!....not only documentation... but now the coding... Like 1 mistake can cause big FREAKING error.... and so hard to debug....

Private Sub StockID_Exit(Cancel As Integer)
Dim StockNum As Long
StockNum = StockID
'frmProducts must be open so that right record can be found
DoCmd.OpenForm "frmProducts"
'Set focus in StockID field and find record
StockID.SetFocus
DoCmd.FindRecord StockNum
'Return to frmTransactions
Forms![frmTransactions].SetFocus
End Sub
Private Sub TransactionQuantity_AfterUpdate()
'calculate the new QuantityInStock on frmProducts
Select Case TransactionType
Case "Sale", "Write-off"
Forms![frmProducts].QuantityInStock = Forms![frmProducts] - TransactionQuantity
'subtract transaction quantity from QuantityInStock on frmProducts
Case "Purchase", "Refund", "Amendment"
Forms![frmProducts].QuantityInStock = Forms![frmProducts].QuantityInStock + TransactionQuantity
EndSelect
End Sub
Private Sub TransactionQuantity_Exit(Cancel As Integer)
'calculate the transaction amount
Select Case TransactionType
Case "Sale", "Refund"
TransactionAmount = TransactionQuantity * Forms![frmProducts].SellingPrice
Case "Purchase", "Write-off", "Amendment"
TransactionAmount = TransactionQuantity * Forms![frmProducts].CostPrice
End Select
End Sub




whre did i go wrong?

Labels: