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!

Copy existing document to new with possible changes

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I have a form that is used for interviews. It is highly probable that the person who was interviewed, will return and complete the process again. I am interested in doing a search of the database to see if the person has completed the interview before. If they have, ask if they have moved or changed employment. If they have not I just need to update a hidden field, but if they have I would like to take what was in the "Current Address" section and move it to the "Prior Address" section, and if they previously had prior address information, drop the last one and move the others down a slot, so that all that needs to be completed the second time is the new address. Any suggestions?

Thanks!
 
You could have a view holding interview docs sorted by name in first column. The button used to create a new interveiw doc could do a search first for the name. You could just use the built in notes search feature to look up the name in that view. If the person already has a doc, open that doc, if not create a new doc. On the form there could be 2 hidden buttons (viewable only for the user who is updating the interview document). One button will simply update the hidden field for no changes (FIELD flag := "No Change"). The other button will move the value(s) from the address field to the previous address field(s), set the original fields to "" and then you can enter the new info.
tempstreet := Street;
Street := "";
tempstate := State;
State := ""
tempzip := Zip;
Zip := ""
PreviousAddress := tempstreet + ", " + tempstate + ", " + tempzip + ";"
PreviousAddress could be a text field (allowing multiple values separted by a newline with separator being the ";")
This field could then hold each previous address on a separate line.
the original address fields would now be blank and ready for filling in the new address info.
I'm sure there are other ways to do this, depending on how automatic you what the process to work and how you want to format the previous address info.
 
Thanks for your help foote, but the interview form gets some parameters (case prefix and case number) from another form to do a lookup on the main database (the notes database is independant). So what I need to do is search the notes database for a previous interview, if it is the same person, then change the case prefix & number and verify against the database that it is a valid case or not, find out about the new address or job, update the form with the new case information and then if needed update the address and job information. Thanks for any assistance!

leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top