I mean a Subform Control on your form. I can't see your form, I don't know if
it has a Subform control on it or not, so I was asking you.
Do you have any OTHER code on the form? Were you aware that you can cancel a
record by hitting the <Esc> key twice? Does doing so successfully cancel the
record? If not, then *something* is saving the record right off the bat.
Okay I figured out what a subform is. I am having trouble figuring
out how to get them to work.
On the Cancel button however. I did
know you can hit esc to get out of it. I tried that way and it still
saves it. It looks like it only saves the record when I enter the
date.
I enter the start and end date which are entered into my Tickets
table. Then I tab down and enter values in my next field, which looks
up the ID and Issue from my parent table Issues and then enters the
value in the corresponding foreign key column in Tickets. If I enter
values in my fields other than the Start and End dates, and then hit
cancel or esc., it exits the form without updating the database.
I have the following other code used on the form:
Dim LngErr As Long, strError As String
SaveIt = True
If (Me.Dirty = True) Then
Me.Dirty = False
End If
Sub Issue_Click()
Select Case IssueID.Value
Case Is = 274
Other.Enabled = True
Case Else
Other.Enabled = False
End Select
End Sub