No editing after one week

longshen

New Member
Joined
Apr 11, 2005
Messages
7
Dear all,

We had used MS Access to create a database.
We have 3 forms that allow people to key in data. Every time after entering the data they will tend to edit it again due to some typo or wrong info. During this editing some people will accidentally edit others data.
We want to prevent people to edit any past data that is more than 1 week old but don’t know how.
We have tried putting an edit button but don’t know what expression or coding to use.
Can we simply use quries to make this work or do we have to create a code for this?
Can anyone kindly help us out?
 
Hi Andrew

The coding is working but i was thinking is there a way to shorten the coding. By using the control properties, Allowedit to set the coding.

for example,

Private Sub Form_Current()
If (Me!Date > Now() - 7) Then

Forms!track.section(acDetail).allowedit = True
Else
Forms!track.section(acDetail).allowedit = False

End If
End Sub

I had try it but it's not working. Where did i go wrong? :huh:
Pls Help....
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,223,261
Messages
6,171,076
Members
452,377
Latest member
bradfordsam

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