T
TESA0_4
I have a sub form (datasheet view) where users can add and amend records.
They also have the option to double click a line in the subform to open a
Single Form view that allows for easier data entry if required. If the user
double clicks an existing record the form open to that record and if the user
double clicks the new record line the new form opens blank except that the
AutoNum has ticked over. What I want is for the new form to open without the
AutoNum ticking over until the user actually starts data entry. I'm finding
users open the new form but close without making any data entry which then
leads to dialogue messages because they haven't filled in mandatory
fields...... The code I am using to open the form is:
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False
If IsNull(Me.txtActionID) Then
DoCmd.OpenForm "frmHazActPers"
DoCmd.GoToRecord , , acNewRec
Else
strWhere = "ActionID = " & Me.txtActionID
DoCmd.OpenForm "frmHazActPers", WhereCondition:=strWhere
End If
Any suggestions would be appreciated.
Terry
They also have the option to double click a line in the subform to open a
Single Form view that allows for easier data entry if required. If the user
double clicks an existing record the form open to that record and if the user
double clicks the new record line the new form opens blank except that the
AutoNum has ticked over. What I want is for the new form to open without the
AutoNum ticking over until the user actually starts data entry. I'm finding
users open the new form but close without making any data entry which then
leads to dialogue messages because they haven't filled in mandatory
fields...... The code I am using to open the form is:
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False
If IsNull(Me.txtActionID) Then
DoCmd.OpenForm "frmHazActPers"
DoCmd.GoToRecord , , acNewRec
Else
strWhere = "ActionID = " & Me.txtActionID
DoCmd.OpenForm "frmHazActPers", WhereCondition:=strWhere
End If
Any suggestions would be appreciated.
Terry