Locking data entry to form

  • Thread starter Thread starter Tammy C
  • Start date Start date
T

Tammy C

We track hours to a jobs by job numbers, but some point
we would like to be able to stop entry of hours. (after
the jobs been billed complete) But would still have the
data in the tables to report against. I have looked in
help I am probaly entering the wrong thing to get the
right answer.

Thanks Tammy C
 
On the Form, you have properties for:
Allowing Editing -> AllowEdits {True | False}
Allowing Deletions -> AllowDeletes {True | False}
Allowing New Records -> AllowAdditions {True | False}

On the Form_Load() event, you can specify the settings that you wish to use.

For example:

If today's date is equal to or greater than the completion date Then
Me.AllowAdditions = False
Me.AllowEdits = False
Me.AllowDeletions = False

HTH
--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
As I understand, what you want is that in the work hour inputting form, if a
job is completed, user will not be able to input work hours to that job any
more, while other ongoing jobs still accept work hours input.

So, in the job table, you need have a column, say, "Completion", which has
"Yes/No" type value. On the work hourinputting form, if user chose a job
that is completed (Say, user select a job from a combo box, or the form is
loaded with a job being set), you simply write some VBA code to en/disable
data entering control, based on job's "Completion" column's value (Yes/No).
There is no need to lock data in table, and you should not do that, even you
somehow can "lock".
 
Back
Top