A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto populate field in table



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 09:02 PM posted to microsoft.public.access.tablesdbdesign
gm via AccessMonster.com
external usenet poster
 
Posts: 1
Default Auto populate field in table

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201004/1

  #2  
Old April 28th, 2010, 09:12 PM posted to microsoft.public.access.tablesdbdesign
XPS350
external usenet poster
 
Posts: 69
Default Auto populate field in table

On 28 apr, 22:02, "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

--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-tablesdbdesign/20...


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
  #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]
  #4  
Old April 30th, 2010, 01:53 PM posted to microsoft.public.access.tablesdbdesign
Gopb via AccessMonster.com
external usenet poster
 
Posts: 5
Default Auto populate field in table

Thanks for the quick responce. It did the trick

GM

John W. Vinson wrote:
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]

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.


--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.