I have a form that opens so the user can add a record. Here is the code from the onclick event of a command button on a previousy opened form:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmFinGoodsTranx"
DoCmd.OpenForm stDocName, acNormal, , "[Type] = 'FG'", acFormAdd, acWindowNormal
Then on this same form I have a combobox from whch the user can select an existing record. When they select the record I want the record to display on the form but this is not working.
Here is the afterupdate event code:
Private Sub Combo60_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Combo60], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
What am I doing wrong?