C
CJ
Hi Groupies
I am trying to use Open Arguments to open a form and
find a matching inventory item. If the item does not exist
I want to go to a new record. I borrowed the code from an
old thread but I can not quite get it to work for me.
I keep getting "Else without If" when I compile the code.
Private Sub Form_Load()
If Len(Me.OpenArgs) > 0 Then
With Me.RecordsetClone
.FindFirst "[Sku Number]=" & Me.OpenArgs
Else <BREAK POINT>
If .NoMatch Then DoCmd.GoToRecord , , acNewRec
Else
Me.Bookmark = .Bookmark
End If
End With
End If
End Sub
Someday I will get a thorough handle on VBA........sigh....
I am trying to use Open Arguments to open a form and
find a matching inventory item. If the item does not exist
I want to go to a new record. I borrowed the code from an
old thread but I can not quite get it to work for me.
I keep getting "Else without If" when I compile the code.
Private Sub Form_Load()
If Len(Me.OpenArgs) > 0 Then
With Me.RecordsetClone
.FindFirst "[Sku Number]=" & Me.OpenArgs
Else <BREAK POINT>
If .NoMatch Then DoCmd.GoToRecord , , acNewRec
Else
Me.Bookmark = .Bookmark
End If
End With
End If
End Sub
Someday I will get a thorough handle on VBA........sigh....