L
Lori
I have a combo box set up. The pull down menu is a list that is tied to a
table "Titles". I have the event "On Double Click" set up to open that form
so the user can add a title if not already on the list.
Currently it opens and the first Title of the form shows up (edit mode). I
would like it to open to a new file. How would I do this? Do I add code to
the "On Open" event of the Title form or is there another way. Here is my
code. Thanks in advance.
Private Sub Title_DblClick(Cancel As Integer)
On Error GoTo Err_Title_DblClick
Dim lngTitle As Long
If IsNull(Me![Title]) Then
Me![Title].Text = ""
Else
lngTitle = Me![Title]
Me![Title] = Null
End If
DoCmd.OpenForm "frmContactTitles", , , , , acDialog, "GotoNew"
Me![Title].Requery
If lngTitle <> 0 Then Me![Title] = lngTitle
Exit_Title_DblClick:
Exit Sub
Err_Title_DblClick:
MsgBox Err.Description
End Sub
table "Titles". I have the event "On Double Click" set up to open that form
so the user can add a title if not already on the list.
Currently it opens and the first Title of the form shows up (edit mode). I
would like it to open to a new file. How would I do this? Do I add code to
the "On Open" event of the Title form or is there another way. Here is my
code. Thanks in advance.
Private Sub Title_DblClick(Cancel As Integer)
On Error GoTo Err_Title_DblClick
Dim lngTitle As Long
If IsNull(Me![Title]) Then
Me![Title].Text = ""
Else
lngTitle = Me![Title]
Me![Title] = Null
End If
DoCmd.OpenForm "frmContactTitles", , , , , acDialog, "GotoNew"
Me![Title].Requery
If lngTitle <> 0 Then Me![Title] = lngTitle
Exit_Title_DblClick:
Exit Sub
Err_Title_DblClick:
MsgBox Err.Description
End Sub