Main and Subform Locking

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
 
A

Allen Browne

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.
 
B

Bill Taylor

In the OnCurrent event of the form check If VBA.Date > original date + 30
Then Me.Locked = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top