Access form, only allow user to edit last date data

maabbas

Board Regular
Joined
Aug 11, 2011
Messages
201
Is there anyway I can restrict user to edit only the last day data in the user form, and disable editing for all other dates.

Please note that there are several data in same date.

Thanks in advance
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I like to have one form for editing data and another for viewing data - which is maybe bad or maybe not. But in such case, you would not display any records on the "edit" form, unless they are available to be edited. So as noted, you would filter the form and not display the data at all unless it is within the last day.

If you have the ability for the user to see all records for all days, but only want them to be able to edit for the last day, I think it would be tricky. Probably you will need to have a before_update event that checks your criteria and if it fails, then abort the transaction and let the user know that the record cannot be updated with a message. Hopefully they will quickly learn - only records within the last day can be changed.

I suppose a way to combine the two possibilities might also be to have two subforms, or form + subform, one that shows display records for viewing and another that shows records that can be updated. Or you might try to do something fancy with the actual rows themselves - but in that case, I leave it to you to play around or others to suggest.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,713
Messages
6,161,463
Members
451,708
Latest member
PedroMoss2268

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top