New Record- Make all field editable.

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.
 
M

Minton M

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
 
S

Stuart McCall

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)
 
C

Chel

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
 
C

Chel

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)
 

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

Top