Main and Subform Locking

  • Thread starter Thread starter GREG
  • Start date Start date
G

GREG

Hi,

I have a form call Parts Request, which has a sub-form,
Parts Request Items, which identifies the parts, qty
ordered, received, and date received. There is also a
button on this form that starts another form, which is
used to record part returns.
Is it possible to lock the Part Request and Part
Request Items Form from changes, after 30 days, based on
the date the part was received? If so, how should this
be initiated?

Any guidance, information, examples, etc...would be
most appreciated it.

Thanks in advance,
Greg
 
Use the Current event of the form to set the form's AllowEdits (or the
Locked property of the controls.)

Since your form involves multiple parts in the subform, delivered on
potentially different dates(?), I'm not sure how you would decide which date
to use.
 
In the OnCurrent event of the form check If VBA.Date > original date + 30
Then Me.Locked = True
 
Back
Top