Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11

    kuwang pa ni ako code.. ang iya department wala pa gale ko ka butang anha..... then daghan pa man kuwang ana ako code.. galibog man jud ko.. cge lang butang og.. mismatch ang error..

  2. #12
    dugay jud ni maghuman stylela kung di patuo

  3. #13
    '--ako iksuggest,
    '--ilisi ang Currency ug Double
    '--ilisi ang Val ug Cdbl..

    '--kini n code bro, error mani...

    'deduc - val(lblBasicPay.caption) * 0.3
    'rs!empStatusRegProb = optPro.value and optReg.value

    '--------------------------------------------------------

    'elseif txtHWorked.text > 40 then ----ilisi ni bro ug ing-ani
    elseif Cdbl(txtHWorked.text) > 40 then

    '--mas mau ipakita ang code asa mg-error
    '--ug unsay error para ma.trace..

  4. #14
    Quote Originally Posted by rhex_tendo View Post
    '--mas mau ipakita ang code asa mg-error
    '--ug unsay error para ma.trace..
    mao para dali ra ang tabang moabot.

  5. #15
    Quote Originally Posted by ferdz_willz View Post
    mao ni ko code ai....den i dont know pud if sakto bah sad kaha ni ang formula nako sa computation... d jud nako ma save. cge lang error.. basin naa mo mga suggesstions.. all i need is ma save then masakto na ang computation ani.... naa sad ni module.. ok ra ako module...






    option explicit
    dim pay as currency
    dim sss as currency
    dim tax as currency
    dim rate as currency
    dim ot as currency
    dim otrate as currency
    dim deduc as currency
    --------------------------------------------------------------------
    private sub cmdsave_click()
    call settable

    pay = val(txtHWorked.text) * val(txtRPHour.text)
    sss = pay * 0.02
    tax = pay * 0.15
    deduc - val(lblBasicPay.caption) * 0.3
    lblSSS.caption = sss
    lblBasicPay.caption = pay
    lblTax.caption = tax
    lblOTRate.caption = val(lblOTHours.caption) * (txtRPHour.text + (txtRPHour.text / 2))
    lblTotalDeduc.caption = val (lblSSS.caption) + val(lblTax.caption) +val(txtdeduc.text)
    lblNetPay.caption = val(lblBasicPay.caption) + val(lblOTRate.caption) - val(lblTotalDeduc.caption)

    if checkID(txtID.text) then
    msgbox " employee ID is not unique", vbcritical
    elseif txtID.text = "" or txtName.text = "" or txtAddr.text = "" or txtDept.text = "" or txtHWorked.text = "" or txtRPHour.text = "" or txtDeduc.text = "" then
    msgbox "please fill up all fields", vbcritical

    elseif txtHWorked.text > 40 then
    lblOTHours.caption = val(txtHWorked.text) - 40
    else
    rs.addnew

    rs!empID = txtID.text
    rs!empName = txtName.text
    rs!empAddr = txtAddr.text
    rs!empDept = txtDept.text
    rs!empStatusRegProb = optPro.value and optReg.value
    rs!empHWorked = txtHWorked.text
    rs!empRPHour = val(txtRPHour.text)
    rs!empDeduc = val(txtDeduc.text)
    rs!empSSS = val(lblSSS.caption)
    rs!empTax = val(lblTax.caption)
    rs!empBasicPay = val(lblBasicPay.caption)
    rs!empOTHours = val(lblOTHours.caption)
    rs!empOTRate = val(lblOTRate.caption)
    rs!empTotalDeduc = val(lblTOtalDeduc.caption)
    rs!empNetPay = val(lblNetPay.caption)
    rs.update
    msgbox " new record added...",vbinformation
    end if

    end sub
    Bro murag dili gyud ka save kay murag wala ko kakita kung asa imong database connection.
    Unang buhaton nimo bro try lang sa gamay nga data i save para sayon ra pag trace sa error, Nya pwede raman na ipaawahi imong computation kung maka connect na gyud ka sa imong database.


    Sample, pero dili gyud complete...

    Dim rs As Recordset
    rs.Open (blah blah............)
    rs.AddNew
    rs!EmpID = txtEmpID.Text
    rs!FNam = txtFName.Text
    rs.Update
    MsgBox("Save",vbInformation+vbOkOnly,"Sample Text");
    rs.Close

  6. #16
    hahaha mao gyud asa man diay ma save, mga wla ka open nga conntion sa imo db, dayon wla pud nimo open recordset or table, libog imo button asa niya e pansak ang data, murag sakto kang forever nga comment boss.

  7. #17
    bitaw walay declaration sa connection man, its better pag bughat ug module sa connection then each form tawgon nalang to, then i debug sad na imong program bro para mabal.an nimo kung asa ang sayop

  8. #18
    try to use insert nalang instead of Addnew. Insert into <tableName> values(......) then i open imong database then close after

  9. #19
    'Is this problem solved

  10. #20

  11.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. Looking For: kinsay nangita og encoder dha??
    By chicky in forum Jobs
    Replies: 4
    Last Post: 07-11-2011, 09:25 PM
  2. kinsay kamao og VB dha? waaahh.. nag libog man jud ko d mada..
    By ferdz_willz in forum General Discussions
    Replies: 26
    Last Post: 08-13-2010, 01:26 AM
  3. Kinsay nakahibaw og derma clinic sa Cebu?
    By anne marie in forum Fitness & Health
    Replies: 7
    Last Post: 07-04-2007, 09:41 PM
  4. kinsay hilig og death dri?
    By dogtik007 in forum Music & Radio
    Replies: 82
    Last Post: 06-05-2006, 10:18 AM
  5. kinsa kamao og dreamweaver?
    By AMD_earl in forum Websites & Multimedia
    Replies: 29
    Last Post: 04-21-2006, 07:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top