Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating view documents using 2 different forms

Status
Not open for further replies.

tracia

Programmer
Jan 27, 2003
4
MY
I have 2 Forms. Form 1 is used to enter data of staff and Form 2 is a Leave Aplication Form for users.The Form 1 data is displayed in View 1.

Certain information contained in Form 2 (i.e.name,id,etc..) are automatically displayed when the user opens Form 2, the data is fetched based on View 1. But there are certain columns that changes it's valu like the Leave balance. When Form 2 is opened, it retrieves the current leave balance and when a leave is applied, it subtracts the no. of days applied for from the leave balance.

Thus, I need to update my View 1 with the current leave balance. How do i do this? I tried creatign the View based on both the Forms but it gives me double entry, one with the old leave balance and 1 with the new. When this happens and I open Form 2, nothing is displayed in the Leave Balance field.

Kindly enlighten me on how I can actually do an update on my view documents? Thanx a million.
 
If I have read this correctly, I think that what you are trying to do is allow users to request leave based on their current remaining days.
Obviously, when a request is made/granted, the current remaining days needs to be modified.
I would guess that current remaining days is stored in form 1, containing staff data. So in form 2, I would include code that updates the document in form 1 with the new current remaining day value.
This means you need to have a way to "link" form 2 to form 1. A lookup could suffice, if done properly. Otherwise, you might wish to use profile documents. That would be an easy way to link the right doc to the right person.

Good luck !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top