Filter

D

D

Hi:

I have a form based on query that filters on a user’s Sales ID, when opens.
for example the form for a specific user has 20 records; 10 of them are
locked (budget) and 10 can be edited (forecasted); Once the first forecast
record is found and a filter is applied to get just the ones for forecast (10
records), so far so good; BUT when I remove the filter I get the entire
table, for all the users.

Can you please tell me if is there a way when I un-filter, to get just the
records for the same user 20?

Thank you,

Dan
 
M

Marshall Barton

D said:
I have a form based on query that filters on a user’s Sales ID, when opens.
for example the form for a specific user has 20 records; 10 of them are
locked (budget) and 10 can be edited (forecasted); Once the first forecast
record is found and a filter is applied to get just the ones for forecast (10
records), so far so good; BUT when I remove the filter I get the entire
table, for all the users.

Can you please tell me if is there a way when I un-filter, to get just the
records for the same user 20?


How are you applying the two filters and how do you remove
them?
 
D

D

Hi Marsh:

Thanks!

When the form Opens (user already anterd his ID, prompted based on qry.
criteria [enter ID]) shows the records just for him; but he/she easily can go
to Records-->Remove Filter/Sort and see all the records for the all users.

But I think to unfilter and see the records just for him again,is not
possible; one way would be to create another Menu Bar with no Filter command.

Thanks again,

Dan
 
M

Marshall Barton

D said:
When the form Opens (user already anterd his ID, prompted based on qry.
criteria [enter ID]) shows the records just for him; but he/she easily can go
to Records-->Remove Filter/Sort and see all the records for the all users.

But I think to unfilter and see the records just for him again,is not
possible; one way would be to create another Menu Bar with no Filter command.


THe tool bar buttons for this are too heavy handeed to use
effectively. You should use your own xommand buttons an the
form along with some VBA code to set the form's Filter
property to meet your specific needs.

If the form's record source query includes a parameter as
criteria, then I think you can use some relatively simple
code like:

'code to apply a forecasted filter

Me.Filter = "[forcast field] = " & whatever
Me.FilterOn = True

'code to remove forecasted filter

Me.FilterOn = False
 
D

D

Thank you Marsh!

Always helpful!

Dan

Marshall Barton said:
D said:
When the form Opens (user already anterd his ID, prompted based on qry.
criteria [enter ID]) shows the records just for him; but he/she easily can go
to Records-->Remove Filter/Sort and see all the records for the all users.

But I think to unfilter and see the records just for him again,is not
possible; one way would be to create another Menu Bar with no Filter command.


THe tool bar buttons for this are too heavy handeed to use
effectively. You should use your own xommand buttons an the
form along with some VBA code to set the form's Filter
property to meet your specific needs.

If the form's record source query includes a parameter as
criteria, then I think you can use some relatively simple
code like:

'code to apply a forecasted filter

Me.Filter = "[forcast field] = " & whatever
Me.FilterOn = True

'code to remove forecasted filter

Me.FilterOn = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top