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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Save As Command?



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2009, 06:06 PM posted to microsoft.public.access.forms
Yecenia
external usenet poster
 
Posts: 29
Default Save As Command?

We have a form that tracks employee assignments. The same assignment can
change multiple times in one day, but the changes are minimal. Regardless,
each change/version must be saved.

Can I keep each employee one time in a table, show that table in an editable
form, and put a command button that saves the information/record that is
showing to another table?

Help!


  #2  
Old April 9th, 2009, 07:58 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Save As Command?

"Yecenia" wrote in message
...
We have a form that tracks employee assignments. The same assignment can
change multiple times in one day, but the changes are minimal.
Regardless,
each change/version must be saved.

Can I keep each employee one time in a table, show that table in an
editable
form, and put a command button that saves the information/record that is
showing to another table?



If I understand the situation you decribe ...

The static information about the employee, which doesn't change frequently,
should be in one table, maybe called Employees. The assignment information,
which changes frequently, should be in another table (maybe called
Assignments), which is linked to the Employees table by a common key field
(EmployeeID, or some such). There would be a one-to-many relationship
between Employees and Assignments.

As I understand it, you need to preserve the history of changes to each
employee's assignments. Therefore, your Assignments table needs to contain
a date/time field (maybe called WhenAssigned), and you have to do some
special coding on a form to ensure that, rather than modifying an employee's
current assignment record, you create a new one whenever you change the
assignment. Your code might automatically populate that record initially
with the latest values for that employee, so that you only need to update
the fields that have changed.

When that record is saved, you would set the WhenAssigned field to the value
of the function Now(), which gives the current date and time. That way, a
query can pull the latest record for each employee, thus allowing you to
view and report the current assignments.

All of this is quite doable; however, coding to always create new assignment
records rather than modifying existing ones could be a little tricky.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #3  
Old April 9th, 2009, 08:24 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Save As Command?

On Thu, 9 Apr 2009 10:06:08 -0700, Yecenia
wrote:

We have a form that tracks employee assignments. The same assignment can
change multiple times in one day, but the changes are minimal. Regardless,
each change/version must be saved.

Can I keep each employee one time in a table, show that table in an editable
form, and put a command button that saves the information/record that is
showing to another table?

Help!

I would do this using two tables - an Employee table related one-to-many to an
EmployeeAssignments table. You'ld have a Form based on Employees and a Subform
based on EMployeeAssignments; when a new assignment is entered simply find the
employee's record on the mainform (using a combo box perhaps), and enter a new
record on the subform.
--

John W. Vinson [MVP]
  #4  
Old April 9th, 2009, 09:14 PM posted to microsoft.public.access.forms
Yecenia
external usenet poster
 
Posts: 29
Default Save As Command?



"Dirk Goldgar" wrote:

"Yecenia" wrote in message
...
We have a form that tracks employee assignments. The same assignment can
change multiple times in one day, but the changes are minimal.
Regardless,
each change/version must be saved.

Can I keep each employee one time in a table, show that table in an
editable
form, and put a command button that saves the information/record that is
showing to another table?



If I understand the situation you decribe ...

The static information about the employee, which doesn't change frequently,
should be in one table, maybe called Employees. The assignment information,
which changes frequently, should be in another table (maybe called
Assignments), which is linked to the Employees table by a common key field
(EmployeeID, or some such). There would be a one-to-many relationship
between Employees and Assignments.

As I understand it, you need to preserve the history of changes to each
employee's assignments. Therefore, your Assignments table needs to contain
a date/time field (maybe called WhenAssigned), and you have to do some
special coding on a form to ensure that, rather than modifying an employee's
current assignment record, you create a new one whenever you change the
assignment. Your code might automatically populate that record initially
with the latest values for that employee, so that you only need to update
the fields that have changed.

When that record is saved, you would set the WhenAssigned field to the value
of the function Now(), which gives the current date and time. That way, a
query can pull the latest record for each employee, thus allowing you to
view and report the current assignments.

All of this is quite doable; however, coding to always create new assignment
records rather than modifying existing ones could be a little tricky.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



I do have one table called Employee Details and another table called
Assignment_Log. I have a one to many relationship between the two.

It sounds like I would need to create some sort of coding, but I would not
know where to begin. What suggestions do you have?


  #5  
Old April 9th, 2009, 09:53 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Save As Command?

"Yecenia" wrote in message
...

I do have one table called Employee Details and another table called
Assignment_Log. I have a one to many relationship between the two.


Very good.

It sounds like I would need to create some sort of coding, but I would not
know where to begin. What suggestions do you have?


At this point you should decide how you want to look at and edit the data.
What form or forms do you want, and how do you want them to behave? Since
you intend to keep a history of each employee's assignments, do you want the
form to show all previous assignment details as well as the current one? If
so, a simple main-form/subform arrangement such as John Vinson suggested may
be all you need, with maybe a little code to initialize a new assignment
record by copying data from the most recent previous record.

Alternatively, you could have a form that shows the current details in a
nonupdatable way, and a command button to create a new assignment based on
those details and present it for editing in the same form. Or ... well, you
could set it up lots of ways -- the point is that you need to decide how
*you* want the data to be presented, and how you want the user (whether it's
you or someone else) to be able to work with it.

Once you've decided that, if you can't figure out how to make it happen, we
can help you with the details.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 




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 08:39 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.