New Record- Make all field editable.

  • Thread starter Thread starter Chel
  • Start date Start date
C

Chel

Ok I have two forms. One form, the main form, shows a datasheet of
information. Currently, the datasheet (form) shows 15 records of an item and
its serial number.
The serial number is a link to another form where you have the details. When
the user first opens the Details screen only one field is editable until the
EDIT button in pressed- then all fields are ediatble.

The problem is on the datasheet below the 15th record (last record) when the
user clicks new a empty DETAILS form displays with the one record editable
until the EDIT button is pressed. How can I put in code to recognize that
when the user opens a NEW Details Form to enter a new record all fields
should be open for edits.

How can I, by default, open all fields when a new record is to be entered?
I hope that explains my problem.
 
Ok I have two forms. One form, the main form, shows a datasheet of
information. Currently, the datasheet (form) shows 15 records of an item and
its serial number.
The serial number is a link to another form where you have the details. When
the user first opens the Details screen only one field is editable until the
EDIT button in pressed- then all fields are ediatble.

The problem is on the datasheet below the 15th record (last record) when the
user clicks new a empty DETAILS form displays with the one record editable
until the EDIT button is pressed. How can I put in code to recognize that
when the user opens a NEW Details Form to enter a new record all fields
should be open for edits.

How can I, by default, open all fields when a new record is to be entered?
I hope that explains my problem.

Use the form's current event and put this code in there:

Me.Text0.Enabled = Me.NewRecord

This will enable the control when you're on a New Record. (Obviously,
repeat for each control you want to change.)

Hope this helps,
James
 
Chel said:
Ok I have two forms. One form, the main form, shows a datasheet of
information. Currently, the datasheet (form) shows 15 records of an item
and
its serial number.
The serial number is a link to another form where you have the details.
When
the user first opens the Details screen only one field is editable until
the
EDIT button in pressed- then all fields are ediatble.

The problem is on the datasheet below the 15th record (last record) when
the
user clicks new a empty DETAILS form displays with the one record editable
until the EDIT button is pressed. How can I put in code to recognize that
when the user opens a NEW Details Form to enter a new record all fields
should be open for edits.

How can I, by default, open all fields when a new record is to be entered?
I hope that explains my problem.

Forms have a NewRecord property that you can test to alter the form's
behaviour. It returns True if the form's current record is the 'New' record.
Try the following code in the DETAILS form's OnLoad event:

If Me.NewRecord Then
Me.EDITbutton_Click
End If

(change EDITbutton to the real name of the button)
 
Thanks!

Minton M said:
Use the form's current event and put this code in there:

Me.Text0.Enabled = Me.NewRecord

This will enable the control when you're on a New Record. (Obviously,
repeat for each control you want to change.)

Hope this helps,
James
 
Thanks!!

Stuart McCall said:
Forms have a NewRecord property that you can test to alter the form's
behaviour. It returns True if the form's current record is the 'New' record.
Try the following code in the DETAILS form's OnLoad event:

If Me.NewRecord Then
Me.EDITbutton_Click
End If

(change EDITbutton to the real name of the button)
 
Back
Top