Filtering

  • Thread starter Thread starter J
  • Start date Start date
J

J

I'm trying to get my access database to display a message box where the
user can type in information that they want a report to be created on
when a button is clicked but so far everything I've tried hasn't
worked. All suggestions welcomed.
 
Hi,
create a query. In the criteria area of the field you want your user to
filter on either put:

[Enter parameter here:]

Or reference a control on a form:

[Forms]![YourForm]![YourControl]

Now if you run the query it will either come up with an input box asking for
the parameter value or pull the value from a form control and then filter its
results based on that. Now you can create a report based on this query and
when opening the report it should do the same.
Is that what you want?
HTH
Good luck
 
I managed to get the message to pop up about entering the number i need
filtered but when the report comes up all the numbers in the table are
included within the report. I made sure to put the form filtering on.
I'm not sure what else could be causing the problem.
 
Now I have another problem. It has been brought to my attention that
when there is no data in the number field that the search will bring
back any record that includes the number that has been input. If
anyone has any ideas on what the problem might be I would appreciate
some feedback.
 
I have another filtering problem. When there is no data in the fields
that I want to filter out, the data is still returned in the report.
I've tried a few things already but so far nothing has seemed to work
out. If anyone could give me some tips on what I should be doing then
I would greatly appreciate it.
 
In the criteria of the field which might not have data put:

Not Is Null

This should only give you the ones which have data in them.
HTH
Good luck
 
No matter if i put that in or not it still screws up for me. If i
have:

Number = 1 and then do a search, the record will come up that contains
1 in the number field however,

when Number = Null then the same record is displayed which is what
confuses me because even tho nothing is in the field that I want to
search then I am getting data returned.
 
Back
Top