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

Table Events

Status
Not open for further replies.

Girls3Mut1

Technical User
Aug 12, 2011
11
US
I see that Access 2010 does support table events. I would like to use the After Insert event to concatenate the data in two columns and place the resultant in a third column. Can someone tell me where I can find a good reading resource to develop this logic.
 
Why? If it is a simple concatenation do it in a query and do not store it.
 
I should have told you that I have the code to do this in a query already and I'm looking for a way to have this automated and thought a table event after insert might be the way to go.
 
Why would you need to store calculated data in a table, is my question. Does the concatenated field become a primary key? Normally calculated fields are not stored in a table. Data Macros (no such thing as table events) may make storing calculated fields less problematic, but still would not recommend it.
 
Yes, the concatenated string becomes the primary key for the table.
 
Why not simply use a composite PK based on the 2 fields ????

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Why not use a smaller, more compact, and less-likely to change PK? People change their names all the time (get married, etc). Sounds like a mainenance hassle. And of course what will happen when you have two people named Ashley Smith?

--Lilliabeth
 
My primary key selection is solid and duplicates will never occur. I played with this for awhile and used a table data macro with the Before Change event to make this work the way I need it to.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top