B
Biggles
There may be many thing wrong with this, so I apologize from the start. I
have one form that builds the reference number, and I want to transfer that
and other information to the Main Input Form, and then move to that record in
the Main Input Form. Right now, the form opens to the first record. I have
the following in the Form_Load event:
Private Sub Form_Load()
If Me.OpenArgs = 1 Then
DoCmd.GoToRecord , , acNewRec
[Issue Entry Date] = Now()
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
'Go to this issue
If Me.Dirty Then Me.Dirty = False
Dim rs As Object
Dim srchstr As String
Set rs = Me.Recordset.Clone
srchstr = "[Issue Reference Number] = '" &
Forms!frmnewissue_setup.Text5 & "'"
rs.FindFirst srchstr
If rs.EOF = True Then
Debug.Print "no record"
End If
Me.Detail.Visible = True
Me.Bookmark = rs.Bookmark
DoCmd.Close acForm, "frmnewissue_setup"
End If
DoCmd.Maximize
End Sub
The code to open this is:
Dim formname As String
formname = "master input form"
DoCmd.OpenForm formname, , , , , , 1
What am I missing?
have one form that builds the reference number, and I want to transfer that
and other information to the Main Input Form, and then move to that record in
the Main Input Form. Right now, the form opens to the first record. I have
the following in the Form_Load event:
Private Sub Form_Load()
If Me.OpenArgs = 1 Then
DoCmd.GoToRecord , , acNewRec
[Issue Entry Date] = Now()
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
'Go to this issue
If Me.Dirty Then Me.Dirty = False
Dim rs As Object
Dim srchstr As String
Set rs = Me.Recordset.Clone
srchstr = "[Issue Reference Number] = '" &
Forms!frmnewissue_setup.Text5 & "'"
rs.FindFirst srchstr
If rs.EOF = True Then
Debug.Print "no record"
End If
Me.Detail.Visible = True
Me.Bookmark = rs.Bookmark
DoCmd.Close acForm, "frmnewissue_setup"
End If
DoCmd.Maximize
End Sub
The code to open this is:
Dim formname As String
formname = "master input form"
DoCmd.OpenForm formname, , , , , , 1
What am I missing?