New Record Property

M

Martin

I have a continuous form that is set to allow Edits, Deletions and Adds. The
following statement in the On Current event procedure:
If Forms![EDIT-Phys Offices].NewRecord = True Then
[Confirm Add Record]
End If

This works fine except when I am deleting the last record. The add record
confirmation displays before the confirmation of the delete.

The only way I have found to get around this is to use the Afer Del Confirm
and Delete events to set or reset a flag and check that flag in the above IF
as in:
If Forms![EDIT-Phys Offices].NewRecord = True And DelFlag <> "Y" Then
[Confirm Add Record]
End If

Does anyone have a better suggestion? I prefer not to use the recordset
coding since I am not terribly comfortable with that.

Also, is there a way to move the cursor to the first record in this
continuous form?

Thanks.
 
M

Martin

I guess my brain was working faster than my typing skills. I simply wanted
to indicate that some work was to be done within the IF statement. Not
necessarily that I wanted to confirm the add.


RobFMS said:
What is the purpose of "Confirm Add Record"? If this is to ask if the user
wants to add a new record, may I suggest using the BeforeUpdate event
instead of the Current event.

HTH

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

FMS Advanced Systems Group
http://www.fmsasg.com/


Martin said:
I have a continuous form that is set to allow Edits, Deletions and Adds.
The
following statement in the On Current event procedure:
If Forms![EDIT-Phys Offices].NewRecord = True Then
[Confirm Add Record]
End If

This works fine except when I am deleting the last record. The add record
confirmation displays before the confirmation of the delete.

The only way I have found to get around this is to use the Afer Del
Confirm
and Delete events to set or reset a flag and check that flag in the above
IF
as in:
If Forms![EDIT-Phys Offices].NewRecord = True And DelFlag <> "Y" Then
[Confirm Add Record]
End If

Does anyone have a better suggestion? I prefer not to use the recordset
coding since I am not terribly comfortable with that.

Also, is there a way to move the cursor to the first record in this
continuous form?

Thanks.
 

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