how to minus an integer from database (from columns in 2 table)?

hi currently doing a leave management system with vb2005...

in my database..there are 2 tables..

1)Leave_application -- columns available: (Leave_ID, Days_apply)
2)Staff -- columms available: (Staff_id, Leave_balance)

-how do i type the code to minus out the number from "Leave_balance" column(in the Staff table) with the number from "Days_apply" column(in Leave_application table)?

[b]eg: 10 days (in Staff table, "Leave_balance" column) - 2 days (in Leave_application table, "Days_apply" column) = 8 days[/b]

- and then update the "Leave_balance" of staff_ID "S0001" with 8 days

can someone help??

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!