View Single Post
  #3  
Old April 29th, 2010, 01:54 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Auto populate field in table

On Wed, 28 Apr 2010 20:02:11 GMT, "gm via AccessMonster.com" u49152@uwe
wrote:

I have an Access data base that has acumulated 7 years of HR info. We plan to
moving this info
to HR Application. The new application has a field called [EmpStat}.

On my access data base I do not have a [EMPStat] field but I do have a
[Termation date].

Because we have a lot of employees that have terminated it would be great to
import into
the HR program the word "Terminated" into [EMPStat].

How can I do the following in a table: create a new column and call it
[empstat] then say

If [Termination Date] Is Not Null put "Terminated" in the [empstat] field.

If I'm able to do this it would eliviate a lot of manual labor

Thanks

GM


A very simple update query will do this. Create a new Query based on your
table; select the [Termination Date] and EMPStat fields.

Put a criterion of

IS NOT NULL

on [Termination Date], and

IS NULL

on EMPStat (just in case, so you don't destroy existing data).

Change the query to an Update query using the Query menu item or the query
type tool, and put

"Terminated"

on the Update To line under EmpStat. Run the query with the ! icon.
--

John W. Vinson [MVP]