By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Limit the number of available entries to go back.

blyxx86
100+
P: 256
Is there any method to limit the number of entries a person can go back when using a form? For example, being able to only go back to entries entered on date() that way I can be sure no older entries are altered after they have been created, but still allowing edits to be made on entries made the same day. I realize a Now() statement instead of Date() would not allow any previous entries to be shown. Still I do not know if this is possible.

I'm still having issues making user accounts, as when I tried to login with the username and password i input, it said I do not have the permissions and to contact my administrator. So I went into Admin account and it worked. No other account worked. I tried a few different types. Not the current issue.
Nov 22 '06 #1
Share this Question
Share on Google+
3 Replies


nico5038
Expert 2.5K+
P: 3,072
From code you can manage the form's AllowUpdates property in the OnCurrent event.
Assuming your datefield is [FormDate] you can use:

IF Me.FormDate >= Date() then
Me.AllowEdits = True
else
Me.AllowEdits = False
endif

Nic;o)
Nov 22 '06 #2

blyxx86
100+
P: 256
Beautiful. Just beautiful. This would still let the other entries be viewed though, correct?? If so that would be even better. Being able to see the information, but not edit it. Muchos gracias Nico.

From code you can manage the form's AllowUpdates property in the OnCurrent event.
Assuming your datefield is [FormDate] you can use:

IF Me.FormDate >= Date() then
Me.AllowEdits = True
else
Me.AllowEdits = False
endif

Nic;o)
Nov 22 '06 #3

NeoPa
Expert Mod 15k+
P: 31,308
Or if you wanted to allow anything from the last week you could say :
If FormDate > Date()-7 Then ...
Nov 22 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.