Required field on table doesn't work in form

J

jwr

In a table, I have a required field. (field changed to required after form
was created)

A form is created from the table with a field for that one required field.
On the table - open view, I cannot go past that field without entering data
in that field.

On the form, I get the message, once I have passed the field, that it cannot
contain a null. However, when I go back to enter info, the field will not
take any input. This is true whether I try to enter info before or after
the error message.

Thanks
 
S

Sprinks

Hi, jwr.

Is it possible that the control's Locked property is set to Yes, or the
form's AllowEdits and/or AllowAdditions property is set to No?

Sprinks
 
J

jwr

Yes, I did have the control's locked property set to Yes. When I changed
this, it allowed me to enter.

The reason that I had it set to locked is that once that field is entered,
it cannot be edited. How do I accomplish this?

Thanks for your assistance.
 
S

Sprinks

JWR,

Set the Locked property in the control's AfterUpdate event:

If Not IsNull([MyControl]) Then
Me![MyControl].Locked = True
End If

Sprinks
 
P

Peter R. Fletcher

But don't forget to unlock it again (for new records only -
Me.NewRecord = True) in OnCurrent!

JWR,

Set the Locked property in the control's AfterUpdate event:

If Not IsNull([MyControl]) Then
Me![MyControl].Locked = True
End If

Sprinks

jwr said:
Yes, I did have the control's locked property set to Yes. When I changed
this, it allowed me to enter.

The reason that I had it set to locked is that once that field is entered,
it cannot be edited. How do I accomplish this?

Thanks for your assistance.

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
J

jwr

That worked!! Thank you.

May I ask another question - after the fact - relating to this?

How do I "change" the locked information -- OR -- delete that customer if
the info entered was incorrect and not noticed until a later date?

JR
Sprinks said:
JWR,

Set the Locked property in the control's AfterUpdate event:

If Not IsNull([MyControl]) Then
Me![MyControl].Locked = True
End If

Sprinks

jwr said:
Yes, I did have the control's locked property set to Yes. When I changed
this, it allowed me to enter.

The reason that I had it set to locked is that once that field is entered,
it cannot be edited. How do I accomplish this?

Thanks for your assistance.
after
form entering
data it
cannot will
not
 
P

Peter R. Fletcher

You could put a button on the form with its code defined as
Me![MyControl].Locked = False.

That worked!! Thank you.

May I ask another question - after the fact - relating to this?

How do I "change" the locked information -- OR -- delete that customer if
the info entered was incorrect and not noticed until a later date?

JR
Sprinks said:
JWR,

Set the Locked property in the control's AfterUpdate event:

If Not IsNull([MyControl]) Then
Me![MyControl].Locked = True
End If

Sprinks

jwr said:
Yes, I did have the control's locked property set to Yes. When I changed
this, it allowed me to enter.

The reason that I had it set to locked is that once that field is entered,
it cannot be edited. How do I accomplish this?

Thanks for your assistance.
Hi, jwr.

Is it possible that the control's Locked property is set to Yes, or the
form's AllowEdits and/or AllowAdditions property is set to No?

Sprinks


:

In a table, I have a required field. (field changed to required after
form
was created)

A form is created from the table with a field for that one required
field.
On the table - open view, I cannot go past that field without entering
data
in that field.

On the form, I get the message, once I have passed the field, that it
cannot
contain a null. However, when I go back to enter info, the field will
not
take any input. This is true whether I try to enter info before or
after
the error message.

Thanks

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Top