Closing date? to protect history record.... (1 Viewer)

Yu2008

Registered User.
Local time
Today, 08:43
Joined
May 7, 2008
Messages
44
Hi, I am looking for a code that can allow me to enter a closing date on the Warehouse database, so the person who do the warehouse data entry (in Front End) can't change any of the figure that had entered before the closing date (unless I enter the password to change the closing date or release it) but free to enter the data right after the closing date.

Can anyone help me? I'd really appreciate it. Have been searching this for couple hours. But no clue... :confused:
 

apr pillai

AWF VIP
Local time
Today, 21:13
Joined
Jan 20, 2005
Messages
735
Closing Date

If me.closingDate >0 and me.ClosingDate <=Date() then
Me.AllowEdit = True
else
Me.AllowEdit = False
end if
 

Aeon.Divine

< Random Learner. >
Local time
Today, 08:43
Joined
Mar 25, 2008
Messages
55
Ar maybe just to lock the field, cause using allowedit you wont be able to edit nothing in the form. If you just want to protect the date textbox try:

Me.Textboxname.locked = True

And thats it. Hope it'll come in handy.
 

Yu2008

Registered User.
Local time
Today, 08:43
Joined
May 7, 2008
Messages
44
Hi Thanks! :eek:here is my final code:

If Me.Dates < Me.ClosingDate Then
Me.Quantity.Locked = True
'The following statement shows a message box.
MsgBox "Sorry! You can only change data after the closing date."
Else
Me.Quantity.Locked = False
End If
 

Users who are viewing this thread

Top Bottom