Read Only

R

Raj

I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.
Thank you.
 
M

Marshall Barton

Raj said:
I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull(Me.allissuesresolved)
 
R

Raj

Marsh,
Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj said:
I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull (Me.allissuesresolved)
 
B

Brook

This definately sounds like something that I can use as
well. However, is there a way to assign a password so that
if you double click a field once it has been saved and the
allowedits and allowdelitions have been executed, a user
can enter an administrator password to edit the record?

Thanks,

Brook
-----Original Message-----
Raj said:
I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull (Me.allissuesresolved)
 
M

Marshall Barton

If you just want to lock a single control, you can use the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)
--
Marsh
MVP [MS Access]


Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj said:
I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
 
R

Raj

One more thing, I have a combo box in the header of the
form that i need to operate is there away to keep that
active?
-----Original Message-----
Marsh,
Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj said:
I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible? If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull (Me.allissuesresolved)
.
 
M

Marshall Barton

Brook said:
This definately sounds like something that I can use as
well. However, is there a way to assign a password so that
if you double click a field once it has been saved and the
allowedits and allowdelitions have been executed, a user
can enter an administrator password to edit the record?


I don't think you can trap this situation because there is
nothing wrong about clicking on a form that doesn't allow
edits (or on a locked control). Typically, you would add
code to check the user's indentity (however you put that
together) and not lock anything for the privileged users.
 
R

Raj

I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)
--
Marsh
MVP [MS Access]


Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this
possible?
If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
.
 
M

Marshall Barton

Raj said:
One more thing, I have a combo box in the header of the
form that i need to operate is there away to keep that
active?


Then you can't disallow edits to the whole form, you'll have
to Lock each of the controls that you want to block changes
to.

I like to set the Tag property of the controls to lock to
something like LOCK. Then I can use code like this:

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull(Me.allissuesresolved)
End If
Next ctl
 
R

Raj

Ok, I know you are tired of me but Where do i put the Dim
code? I put it in the Afterupdate of [allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj
-----Original Message-----
I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)
--
Marsh
MVP [MS Access]


Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps
and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible?
If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
.
.
 
R

Raj

The error is '438' on ctl.Locked = Not IsNull
(Me.allissuesresolved)
-----Original Message-----
I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)
--
Marsh
MVP [MS Access]


Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps
and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible?
If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
.
.
 
R

Raj

I am now getting and error on ctl.Tag is highlighted any
suggestions?
-----Original Message-----
Ok, I know you are tired of me but Where do i put the Dim
code? I put it in the Afterupdate of [allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj
-----Original Message-----
I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)
--
Marsh
MVP [MS Access]



Raj wrote:
Thank you, this is what I am looking for, just one thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps
and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this possible?
If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
.
.
.
 
M

Marshall Barton

Only set the Tag property of the controls that need to be
locked. The error means that you set the Tag on a label or
line or ?? that doesn't have a Locked property.
--
Marsh
MVP [MS Access]


I am now getting and error on ctl.Tag is highlighted any
suggestions?
-----Original Message-----
Ok, I know you are tired of me but Where do i put the Dim
code? I put it in the Afterupdate of [allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj
-----Original Message-----
I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use
the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)


Raj wrote:
Thank you, this is what I am looking for, just one
thing.
I need the file that is not null to be locked. I tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps
and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this
possible?
If
so how can it be done, I have very very little coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)
 
R

Raj

Marsh,
I removed the Tag from all but one textbox and I am still
getting the same error, I am not sure what I is wrong.
Thank you for much for all your help.
Thanks
Raj
-----Original Message-----
Only set the Tag property of the controls that need to be
locked. The error means that you set the Tag on a label or
line or ?? that doesn't have a Locked property.
--
Marsh
MVP [MS Access]


I am now getting and error on ctl.Tag is highlighted any
suggestions?
-----Original Message-----
Ok, I know you are tired of me but Where do i put the Dim
code? I put it in the Afterupdate of [allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj

-----Original Message-----
I need the whole form locked the frist code works great,
i just need the so that when [allissuesresolved] date is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use
the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)


Raj wrote:
Thank you, this is what I am looking for, just one
thing.
I need the file that is not null to be locked. I
tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but
I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job steps
and
I want to have a the record to be read only when the
[allissuesresolved] date is entered is this
possible?
If
so how can it be done, I have very very little
coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)

.
 
M

Marshall Barton

A text box won't give error 438 for the Locked property
unless the code is placed in an odd event procedure or
you've misspelled something. How about posting the code
that you have now, maybe I'll be able to spot something.
--
Marsh
MVP [MS Access]


Marsh,
I removed the Tag from all but one textbox and I am still
getting the same error, I am not sure what I is wrong.
Thank you for much for all your help.
Thanks
Raj
-----Original Message-----
Only set the Tag property of the controls that need to be
locked. The error means that you set the Tag on a label or
line or ?? that doesn't have a Locked property.

I am now getting and error on ctl.Tag is highlighted any
suggestions?
-----Original Message-----
Ok, I know you are tired of me but Where do i put the
Dim
code? I put it in the Afterupdate of
[allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj

-----Original Message-----
I need the whole form locked the frist code works
great,
i just need the so that when [allissuesresolved] date
is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use
the
same logic on the control:

Me.textbox.Locked = Not IsNull(Me.allissuesresolved)


Raj wrote:
Thank you, this is what I am looking for, just one
thing.
I need the file that is not null to be locked. I
tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but
I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job
steps
and
I want to have a the record to be read only when
the
[allissuesresolved] date is entered is this
possible?
If
so how can it be done, I have very very little
coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value in the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull(Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)

.
 
R

Raj

Marsh,
I copy and paste the code that your provided

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull
(Me.allissuesresolved)
End If
Next ctl
I placed this in the Afterupdate on my
[allissuesresolved] date field, everything looks like it
is spelled corretly to me.
I did get the single item code you
provided "Me.textbox.Locked = Not IsNull
(Me.allissuesresolved)
"and it works great, but I had to do 22 lines of code and
it would be great to have a globe statement to do it.
Thanks again
Raj

-----Original Message-----
A text box won't give error 438 for the Locked property
unless the code is placed in an odd event procedure or
you've misspelled something. How about posting the code
that you have now, maybe I'll be able to spot something.
--
Marsh
MVP [MS Access]


Marsh,
I removed the Tag from all but one textbox and I am still
getting the same error, I am not sure what I is wrong.
Thank you for much for all your help.
Thanks
Raj
-----Original Message-----
Only set the Tag property of the controls that need to be
locked. The error means that you set the Tag on a
label
or
line or ?? that doesn't have a Locked property.


Raj wrote:

I am now getting and error on ctl.Tag is highlighted any
suggestions?
-----Original Message-----
Ok, I know you are tired of me but Where do i put the
Dim
code? I put it in the Afterupdate of
[allissuesresolved]
and I got an error. Also what can i change the "IsNull"
to so that it will lock only the ones that have a date
entered.
Thanks Raj

-----Original Message-----
I need the whole form locked the frist code works
great,
i just need the so that when [allissuesresolved] date
is
filled in to lock, not the ones that have not been
resolved.
Thanks Raj
-----Original Message-----
If you just want to lock a single control, you can use
the
same logic on the control:

Me.textbox.Locked = Not IsNull (Me.allissuesresolved)


Raj wrote:
Thank you, this is what I am looking for, just one
thing.
I need the file that is not null to be locked. I
tried
to change Isnull to not null but that did not work.
Please forgive me for such an elementary question but
I
have little experince with code.
Thanks again
Raj
-----Original Message-----
Raj wrote:

I have a database that is use for tracking job
steps
and
I want to have a the record to be read only when
the
[allissuesresolved] date is entered is this
possible?
If
so how can it be done, I have very very little
coding
experience.


You can set the form's AllowEdits and AllowDeletions
property based on the existence of the a value
in
the
resolved field:

Use the form's Current event procedure:

Me.AllowEdits = Not IsNull (Me.allissuesresolved)
Me.AllowDeletions = Not IsNull
(Me.allissuesresolved)

.

.
 
M

Marshall Barton

Raj said:
I copy and paste the code that your provided

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull
(Me.allissuesresolved)
End If
Next ctl
I placed this in the Afterupdate on my
[allissuesresolved] date field, everything looks like it
is spelled corretly to me.
I did get the single item code you
provided "Me.textbox.Locked = Not IsNull
(Me.allissuesresolved)
"and it works great, but I had to do 22 lines of code and
it would be great to have a globe statement to do it.


The only way I can see that you would get a 438 error from
that code is if you have a label (or something) with its Tag
property set to LOCK.

If you can't find it, try adding
Debug.Print ctl.Name
right after the If statement so the immediate window will
display the name of the control that's giving the error.
 
R

Raj

I will give that a try..
Thanks..
-----Original Message-----
Raj said:
I copy and paste the code that your provided

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull
(Me.allissuesresolved)
End If
Next ctl
I placed this in the Afterupdate on my
[allissuesresolved] date field, everything looks like it
is spelled corretly to me.
I did get the single item code you
provided "Me.textbox.Locked = Not IsNull
(Me.allissuesresolved)
"and it works great, but I had to do 22 lines of code and
it would be great to have a globe statement to do it.


The only way I can see that you would get a 438 error from
that code is if you have a label (or something) with its Tag
property set to LOCK.

If you can't find it, try adding
Debug.Print ctl.Name
right after the If statement so the immediate window will
display the name of the control that's giving the error.
 
R

Raj

Marsh,
THANK YOU!!! It is working.. I really appricate all you
help and time..
Raj
-----Original Message-----
I will give that a try..
Thanks..
-----Original Message-----
Raj said:
I copy and paste the code that your provided

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull
(Me.allissuesresolved)
End If
Next ctl
I placed this in the Afterupdate on my
[allissuesresolved] date field, everything looks like it
is spelled corretly to me.
I did get the single item code you
provided "Me.textbox.Locked = Not IsNull
(Me.allissuesresolved)
"and it works great, but I had to do 22 lines of code and
it would be great to have a globe statement to do it.


The only way I can see that you would get a 438 error from
that code is if you have a label (or something) with
its
Tag
property set to LOCK.

If you can't find it, try adding
Debug.Print ctl.Name
right after the If statement so the immediate window will
display the name of the control that's giving the error.
.
 
M

Marshall Barton

You're welcome, glad to hear that it's working now.
--
Marsh
MVP [MS Access]

Marsh,
THANK YOU!!! It is working.. I really appricate all you
help and time..
Raj
-----Original Message-----
I will give that a try..
Thanks..
-----Original Message-----
Raj wrote:
I copy and paste the code that your provided

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "LOCK" Then
ctl.Locked = Not IsNull
(Me.allissuesresolved)
End If
Next ctl
I placed this in the Afterupdate on my
[allissuesresolved] date field, everything looks like it
is spelled corretly to me.
I did get the single item code you
provided "Me.textbox.Locked = Not IsNull
(Me.allissuesresolved)
"and it works great, but I had to do 22 lines of code and
it would be great to have a globe statement to do it.


The only way I can see that you would get a 438 error from
that code is if you have a label (or something) with
its
Tag
property set to LOCK.

If you can't find it, try adding
Debug.Print ctl.Name
right after the If statement so the immediate window will
display the name of the control that's giving the error.
.
 

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

Similar Threads


Top