RE: How do I filter a data*** using VBA?
- From: "rupertsland" <rupertsland@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Jul 2005 11:35:03 -0700
Hi Ofer.
It didnt' work. If anything, it bumped me into debug mode and crashed Access
(I'm using Access 2003).
After regaining conciousness ... I tried manually filtering the project ID
of 6000. In the properties box for the form, the Filter property shows:
(([qry Reports].PROJ_ID=6000))
So I'm not sure whether to include the (()) or what to do. Any other
suggestions?
Dirk
Winnipeg, Canada
"Ofer" wrote:
> Try this
>
> Me.Filter = "[TableName].[FieldInTableName]='6000'"
> Me.FilterOn = True
>
>
>
> "rupertsland" wrote:
>
> > Greetings.
> >
> > I'm trying to write a VBA procedure to apply a filter to a form when it is
> > opened by a user. I only want to filter on one field. In this case, PROJ_ID =
> > 6000. Sounds simple. The coding I tried to use, unsuccessfully, was:
> >
> >
> > Private Sub Form_Open(Cancel As Integer)
> >
> > Me.OnFilter = "[PROJ_ID]='6000'"
> >
> > End Sub
> >
> >
> > I've also tried...
> >
> > Private Sub Form_Open(Cancel As Integer)
> >
> > Me.Filter = "[PROJ_ID]='6000'"
> >
> > End Sub
> >
> >
> > Instead, I still see all projects listed in the data***. What am I doing
> > wrong and what code should I use to filter out just the one project?
> >
> > Sincerely,
> > Dirk
> >
> > North/South Consultants Inc.
> > Winnipeg, Canada
> >
.
- Follow-Ups:
- RE: How do I filter a data*** using VBA?
- From: Ofer
- RE: How do I filter a data*** using VBA?
- References:
- How do I filter a data*** using VBA?
- From: rupertsland
- RE: How do I filter a data*** using VBA?
- From: Ofer
- How do I filter a data*** using VBA?
- Prev by Date: Re: accessing data from an open query
- Next by Date: Re: Visible/Invisible textboxes on a form - done by record
- Previous by thread: RE: How do I filter a data*** using VBA?
- Next by thread: RE: How do I filter a data*** using VBA?
- Index(es):