> I have a form, that a couple people use. Can I take the below and lock two
> fields instead of 1? The two fields would not always have data in them at the
[quoted text clipped - 11 lines]
> End If
> End Sub
You all are so awesome! Thank you! Wish I could buy you all some beers!!!
> You can lock as many controls as you want in an event;
>
[quoted text clipped - 26 lines]
> > End If
> > End Sub
I guess what I need is:
I have 2 checkboxes that time stamp a field. One group opens the form, does
their work and then closes it. Then another group has their own checkbox that
timestamps. So, can I lock the timestamps after each group?
Does this make sense?
Thanks,
Keith
> You can lock as many controls as you want in an event;
>
[quoted text clipped - 26 lines]
> > End If
> > End Sub
Beetle - 12 Mar 2008 04:58 GMT
So you have two text boxes, each of which is time stamped
programmatically when the check box is clicked? If that is the
case then you can just set the text boxes to locked = Yes in the
properties (no code needed). Having a control locked does not
prevent you from changing it's value via code
Or do the users have to manually enter the time?

Signature
_________
Sean Bailey
> I guess what I need is:
> I have 2 checkboxes that time stamp a field. One group opens the form, does
[quoted text clipped - 35 lines]
> > > End If
> > > End Sub
Keith - 12 Mar 2008 05:13 GMT
Yes, when they check the checkbox it time stamps a field.
Then another group goes in and checks their box and it time stamps another
field.
So, two groups will open the same form, after each group closes it, I want
to lock that groups field. Hopefully that makes more sense.
> So you have two text boxes, each of which is time stamped
> programmatically when the check box is clicked? If that is the
[quoted text clipped - 43 lines]
> > > > End If
> > > > End Sub
Beetle - 12 Mar 2008 05:20 GMT
What event/code are you currently using to create the timestamp?

Signature
_________
Sean Bailey
> Yes, when they check the checkbox it time stamps a field.
> Then another group goes in and checks their box and it time stamps another
[quoted text clipped - 49 lines]
> > > > > End If
> > > > > End Sub
Beetle - 12 Mar 2008 05:04 GMT
I just reread your post and realized I may have misunderstood you. Are
you only timestamping the underlying field in the table (no text boxes
that display the timestamp value on the form)?
And are you trying to prevent the value from being overwritten if
the checkbox is clicked again?

Signature
_________
Sean Bailey
> I guess what I need is:
> I have 2 checkboxes that time stamp a field. One group opens the form, does
[quoted text clipped - 35 lines]
> > > End If
> > > End Sub
Keith - 12 Mar 2008 05:20 GMT
Yes, the text boxes (timestamps) are displayed but are locked.
Yes, that is exactly what I'm trying to do. I don't want the value
(timestamp) to be overwritten once it's clicked or they exit the form and go
back in.
Thank you for all your help,
Keith
> I just reread your post and realized I may have misunderstood you. Are
> you only timestamping the underlying field in the table (no text boxes
[quoted text clipped - 42 lines]
> > > > End If
> > > > End Sub
Beetle - 12 Mar 2008 06:08 GMT
Here is one example of code that could be used in the After Update
event of the checkbox;
Private Sub checkbox_AfterUpdate
If Me.checkbox = True Then
If IsNull(Me.DueDate) Then
Me.DueDate = DateAdd("d", 30, Date())
End If
End If
End Sub
The above code would set the due date to 30 days from today.
First, this code would only run if the checkbox was being changed
from False to True (unchecked to checked) otherwise it would do nothing.
Second, the code would only run if the Due Date was null. If there was
already a value there, it would do nothing.
As long as the text boxes were locked (which I would do in the properties
for each text box), then the time stamp could not be overwritten (at least
not without doing it directly in the table)

Signature
_________
Sean Bailey
> Yes, the text boxes (timestamps) are displayed but are locked.
>
[quoted text clipped - 51 lines]
> > > > > End If
> > > > > End Sub
Keith - 13 Mar 2008 00:39 GMT
Ah, that would work. Thank you, that will be perfect!
Thanks for all your help!!!
> Here is one example of code that could be used in the After Update
> event of the checkbox;
[quoted text clipped - 76 lines]
> > > > > > End If
> > > > > > End Sub