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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database II Access Project

Status
Not open for further replies.

Ninabunny

Programmer
Jul 24, 2000
70
0
0
US
We are creating an alumni database and have to archive some fields to another table.&nbsp;&nbsp;I am trying an if statement to compare the address but have nothing to compare it to?&nbsp;&nbsp;I am to append the address should it be changed, basically appending the original so on got focus the second time I should append then can change thereby saving my original data but how the heck can I do that?&nbsp;&nbsp;Is an IF statement in the Address On change to do that or the LostFocus...Yes Ihave had VB and am in the second semester of Access...HELP!!!<br>Project is due in 1 1/2 weeks
 
Your post is a somewhat garbled. If you want to keep both current and perevious addresses for your alumni, you have 2 choices that I can imagine:<br><br>1)&nbsp;&nbsp;Use an Address table that contains the Alumni Primary Key as a Foreign Key and the date that that address becomes current and put all addresses in here.<br>2)&nbsp;&nbsp;Have the current address only in the Alumni table and use the other table for previous addresses. If you intend to keep more than one previous address you would also need the date field.<br><br>It sounds as if you would not have a table of changes that you would update with a query; instead you'd be doing this operation one-by-one in data entry mode. I don't think, then, that you're actually wanting the <i><b>OnChange</b></i> Event, but the <i><b>BeforeUpdate</b></i> event instead, used with the control's associated <i><b>OldValue</b></i> (see Help if you're not familiar with these). You could use an append query that calls the form's Address table PK and the address field(s). <br><br>There are Access-specific forums at this site. If you'd like more help, please repost your question there. BTW, if you take a bit more trouble to phrase your question clearly you'll get a better response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top