G
Guest
I may be doing this wrong, but there it goes. I open my main input form from
a new issue form, with an openargs of 1. Here is the form load code on the
main input form:
Private Sub Form_Load()
If Me.OpenArgs = 1 Then
Call createnew_issue
Me.Issue_Reference_Number = Forms!frmnewissue_setup.Text5
Me.division = Forms!frmnewissue_setup.Combo3
Me.Year = Forms!frmnewissue_setup.Text9
Me.Combo206 = Forms!frmnewissue_setup.Combo11
'MsgBox "We have prepopulated some fields, but you can change them
if you need to."
Me.Detail.Visible = True
DoCmd.GoToRecord , , acLast
DoCmd.Close acForm, "frmnewissue_setup"
'Me.OpenArgs = 0
End If
DoCmd.Maximize
End Sub
and createnew_issue sub is:
Public Sub createnew_issue()
DoCmd.GoToRecord , , acNewRec
[Issue Entry Date] = Now()
End Sub
So I am trying to make sure the user sees the new record they created on the
first form. The form currently opens on the first record in the database,
but if I click on the goto last button I created, I can see the new record
(hence why I tried the docmd.goto last above).
Do I have to move records after the Form Load has completed?
Thanks
a new issue form, with an openargs of 1. Here is the form load code on the
main input form:
Private Sub Form_Load()
If Me.OpenArgs = 1 Then
Call createnew_issue
Me.Issue_Reference_Number = Forms!frmnewissue_setup.Text5
Me.division = Forms!frmnewissue_setup.Combo3
Me.Year = Forms!frmnewissue_setup.Text9
Me.Combo206 = Forms!frmnewissue_setup.Combo11
'MsgBox "We have prepopulated some fields, but you can change them
if you need to."
Me.Detail.Visible = True
DoCmd.GoToRecord , , acLast
DoCmd.Close acForm, "frmnewissue_setup"
'Me.OpenArgs = 0
End If
DoCmd.Maximize
End Sub
and createnew_issue sub is:
Public Sub createnew_issue()
DoCmd.GoToRecord , , acNewRec
[Issue Entry Date] = Now()
End Sub
So I am trying to make sure the user sees the new record they created on the
first form. The form currently opens on the first record in the database,
but if I click on the goto last button I created, I can see the new record
(hence why I tried the docmd.goto last above).
Do I have to move records after the Form Load has completed?
Thanks