Auto populate field in table

  • Thread starter gm via AccessMonster.com
  • Start date
G

gm via AccessMonster.com

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
 
X

XPS350

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

After you added the EmpStat field you can run a query like:
UPDATE YourTabel SET EmpStat="Terminated" WHERE NOT
IsNull([Termination Date])

Groeten,

Peter
http://access.xps350.com
 
J

John W. Vinson

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.
 
G

Gopb via AccessMonster.com

Thanks for the quick responce. It did the trick

GM
I have an Access data base that has acumulated 7 years of HR info. We plan to
moving this info
[quoted text clipped - 17 lines]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top