Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 109
  • Last Modified:

Capture update date

Hi Experts,
I do not know this is going be possible to do but want to get some ideas or better way to do.  Currently I have a form that have a date call "Rec'd Date", I also have fields call Last Update (PDUPDT) and Last updated by(PDUPDUSR).  I have code for the Last update and Last update by on Form BeforeUpdate:
PDUPDT = Date
PDUPDUSR = "User"
to capture what update the Rec'd Date.
What I want to do is , I want to put two Text Box on the form and show a specific user that updated this record, I don't need to be store in the table.  For example:  JDoe (that's the user's name), enter the Rec'd date on 2/2/15.  the two text boxes on the form will show JDoe, 2/2/15, but if JSmith update the this record on 2/3/15 but not the Rec'd date because once the Rec'd Date enter, it will lock, so no one can edit the Rec'd date, but we want to know when JDoe entered the Rec'd date, that's all we looking for. these two text boxes still show JDoe, 2/2/15.  Is this possible?  How?

Thanks,
0
urjudo
Asked:
urjudo
2 Solutions
 
Gustav BrockCIOCommented:
It is not possible with values not stored in the table or somewhere else.

It would be easier - it it should be done at all - - and perhaps the only possible method - to just store the update date and then - in case of an update error at another user - to refresh the data displayed.

You may need to rethink the concept.

/gustav
0
 
urjudoAuthor Commented:
I put the PDUPDT = Date, so if JDOE access to this record on 2/3/15, then JSmith access to the same record on 2/4/15, the PDUPDT will be changed to 2/4/15 not 2/3/15, the reason I asked this is because one user tried to enter the Rec'd date which this user should not be do that, so when this user entered, anther user update the record then it will be replace the update user's name to the last user and we want to capture to see when she entered the Rec'd date.  I don't want to changed the whole thing on the form just because one user, that's why I tried to think something like that, if you have a better way, please share.
0
 
PatHartmanCommented:
How do you tell which users can update the Rec'd Date?  In the BeforeUpdate event of the Rec'd date, you would check to see if this user is allowed to update the date and if he is, then populate the date and user.  Cancel the update if he is not allowed to update.  Also if you can only update the Rec'd date once, you need to examine the .OldValue property and only allow the update if the .OldValue property of Rec'd date is null.  However, what will you do if someone types in an incorrect value?  You will need a way to override the edit that only allows the data to be entered once.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now