From: Jack Leach dymondjack at hot mail dot on
Can you tell me what line in particular the error is happening at? When you
get the message press Ctrl+Break and the code window should come up with the
line highlighted.

It sounds as though you may be trying to do this with an empty record (no
value for the main LeafletID

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)

From: Cpthooker on
On Mar 17, 12:48 pm, Jack Leach <dymondjack at hot mail dot com>
wrote:
> Can you tell me what line in particular the error is happening at?  When you
> get the message press Ctrl+Break and the code window should come up with the
> line highlighted.
>
> It sounds as though you may be trying to do this with an empty record (no
> value for the main LeafletID
>
> --
> Jack Leachwww.tristatemachine.com
>
> "I haven''t failed, I''ve found ten thousand ways that don''t work."  
> -Thomas Edison (1847-1931)

lID = CLng(Me.OpenArgs)
From: Cpthooker on
This is what i put on the form for the filter to be removed

Private Sub Form_Open(Cancel As Integer)
Dim lID As Long
lID = CLng(Me.OpenArgs)


With Me.RecordsetClone
.FindFirst "LeafletID = " & lID
If .NoMatch Then
MsgBox "Record Not Found!"
Else
Me.Bookmark = .Bookmark
End If
End With
If Len(Nz(Me.OpenArgs, "")) = 0 Then
Cancel = True 'close form if no openargs supplied
End If
End Sub

is this right?
From: Jack Leach dymondjack at hot mail dot on
This means that the OpenArgs are not being sent correctly... did you supply
an argument for OpenArgs in the DoCmd.OpenForm line? Can you post that like
of the code please...


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)



"Cpthooker" wrote:

> On Mar 17, 12:48 pm, Jack Leach <dymondjack at hot mail dot com>
> wrote:
> > Can you tell me what line in particular the error is happening at? When you
> > get the message press Ctrl+Break and the code window should come up with the
> > line highlighted.
> >
> > It sounds as though you may be trying to do this with an empty record (no
> > value for the main LeafletID
> >
> > --
> > Jack Leachwww.tristatemachine.com
> >
> > "I haven''t failed, I''ve found ten thousand ways that don''t work."
> > -Thomas Edison (1847-1931)
>
> lID = CLng(Me.OpenArgs)
> .
>
From: Cpthooker on
You mean the button to open the form?

Private Sub Command129_Click()
On Error GoTo Err_Command129_Click

DoCmd.OpenForm "LeafletDetail", , , , , CStr(Me![LeafletID])

Exit_Command129_Click:
Exit Sub

Err_Command129_Click:
MsgBox Err.Description
Resume Exit_Command129_Click

End Sub

On Mar 17, 3:44 pm, Jack Leach <dymondjack at hot mail dot com> wrote:
> This means that the OpenArgs are not being sent correctly... did you supply
> an argument for OpenArgs in the DoCmd.OpenForm line?  Can you post that like
> of the code please...
>
> --
> Jack Leachwww.tristatemachine.com
>
> "I haven''t failed, I''ve found ten thousand ways that don''t work."  
> -Thomas Edison (1847-1931)
>
>
>
> "Cpthooker" wrote:
> > On Mar 17, 12:48 pm, Jack Leach <dymondjack at hot mail dot com>
> > wrote:
> > > Can you tell me what line in particular the error is happening at?  When you
> > > get the message press Ctrl+Break and the code window should come up with the
> > > line highlighted.
>
> > > It sounds as though you may be trying to do this with an empty record (no
> > > value for the main LeafletID
>
> > > --
> > > Jack Leachwww.tristatemachine.com
>
> > > "I haven''t failed, I''ve found ten thousand ways that don''t work."  
> > > -Thomas Edison (1847-1931)
>
> > lID = CLng(Me.OpenArgs)
> > .- Hide quoted text -
>
> - Show quoted text -