D
danishtune
Guest
The record source of my employee imput form has two tables. An Employee table and a position table. The relationship is one to many with many positions to one employee. This is due to one employee code being for Vacancy.
On the form is a button which enables you to change the employee id of a position number effectively changing the employees position.
Employee pt2 is in positon 1450
Employee table has pt2, pat, thomas, salary, datestarted, etc.
Position table has 1450 , pt2, positon type , positon location, etc.
The procedure behind the change position button, asks what position you want to change to.
You enter 1101
The procedure creates a new positon 0001 and puts your id into it, pt2 and then removes the pt2 from 1450 and puts the pt2 into 1101
This is due to the linking and cascading in the tables. The tables now read
Employee table still is the same
Positon table has 1101, pt2, positon type, position location. etc.
the old positon now has the vacancy code as the employee id.
The problem is that during this procedure the form never moves to the new positon number. It remains on position 1450 until the form is requeried. Then the form goes to record 1. I need to be able to use a goto statement with a variable stored at the time the procedure asks for the new position number. Whether this new positon number is stored in the procedure or on an unbound text box on the form does not matter. I can do either. I just can't get any of the go to or find methods to work with a variable or use the value of the unbound text box to reset the form to the record with the new position number.
If I close the form and reopen it and do a find on any of the fields of the form, the record is updated and fine.
How can I go to the record programically?
On the form is a button which enables you to change the employee id of a position number effectively changing the employees position.
Employee pt2 is in positon 1450
Employee table has pt2, pat, thomas, salary, datestarted, etc.
Position table has 1450 , pt2, positon type , positon location, etc.
The procedure behind the change position button, asks what position you want to change to.
You enter 1101
The procedure creates a new positon 0001 and puts your id into it, pt2 and then removes the pt2 from 1450 and puts the pt2 into 1101
This is due to the linking and cascading in the tables. The tables now read
Employee table still is the same
Positon table has 1101, pt2, positon type, position location. etc.
the old positon now has the vacancy code as the employee id.
The problem is that during this procedure the form never moves to the new positon number. It remains on position 1450 until the form is requeried. Then the form goes to record 1. I need to be able to use a goto statement with a variable stored at the time the procedure asks for the new position number. Whether this new positon number is stored in the procedure or on an unbound text box on the form does not matter. I can do either. I just can't get any of the go to or find methods to work with a variable or use the value of the unbound text box to reset the form to the record with the new position number.
If I close the form and reopen it and do a find on any of the fields of the form, the record is updated and fine.
How can I go to the record programically?