Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remember Last Record

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
US
All,
I hope somoneone can help with this one.

I have frm_test and it has a copy record command button on it.

frm_test_copy is the form that is used to capture the copied record from frm_test

There is a drop-down field on frm_test called status.

The values in the status field are Working, Approved, & Declined.

A typical user doesn't have the ability to change the status field, but my administrators have the ability to change it.

If a record is not in the Approved or Declined state the Administrator has to change it to Working in order for the typical user to copy the record.

Here comes my question:

Example: A record was in the Declined state, when the administrator changed it to Working for the typical user to copy. Once the record is copied, how do I get the copied record to remember to go back to the Declined state after it is copied?

Can someone help me with this?

Any help would be surely appreciated.

Thanks,

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Hi

quick solution

add an extra column to table (oldStatus), in the before update event of the FORM used by the admins, set oldStatus = updated status

in the form used by users to copy the record, add to teh code which copies the record, code to set Status = old Status and clear old status

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Questions:

When you say extra column, do you mean another field?

Should updated status be another field, or is that a function to capture updated information?

I really appreciate your quick response!!!



Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Great!!

You have also given me some good ideas with your suggestions, so I will try and let you know what I come up with.

Thanks again,

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
I first want to thank KenReay for the wonderful suggestion!!!

This is what I ended up doing, based on KenReay's suggestion:

I created another field called oldStatus on the administrative form.

On the "On Mouse Down" event of the status field I put the following code:

oldStatus = status

On the form that has the button to copy the record to another form has the following code in the onClick event as well as the copy code:

status = oldStatus

This works beautifully!!!

Again, I thank you KenReay for the fabulous suggestion.

Have a great evening or day:)

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top