cant pull up report multiple times

BartK

Registered User.
Local time
Today, 11:24
Joined
Jun 7, 2013
Messages
115
Hi everyone,
Here is my delima, I have a report that I am able to type in a keyword and it will pull up that report exactly as I type the keyword, however, let's say that I want to pull up someone else's report I cannot. I have to exit out of my report and then go back into it and resubmit the new search.

Anyone have any thoughts on this? Thanks.
 
... I have a report that I am able to type in a keyword and it will pull up ...
I may misunderstand the above, but Reports are for showing data, not for interacting with users, for that are forms made.
 
Sorry about that, what I have is a button on my form that pulls a report after it has been filtered thru a text box.

The Button brings up a text box and I input the last name and it spits out everyone who has that last name, lets say their last name is smith. And it shows me a report of everyone who has that last name.

After I do this if I want to pull everyone with the last name of Doe, I have to close my report and repeat the same steps listed above in order to filter the last name of Doe.

My question is can I just select my button again to perform another search or do I have to exit out each time to my form to get what I'm looking for.

Would displaying my code help any, Sorry this is about as clear as mudd. Thanks once again.
 
You have to put some code behind the button, which look if the report is open, if yes, then close it (by code) or refresh/ requery the report. If it is not open, then you have to open it.
If you not can get it to work, then show your code.
 
The following is the code that I have behind my Button to pull up the records by the last name. Any thoughts? One thing I forgot to mention is that on click I am running an embedded macro.

Report Name Surface Training
View Report
Filter Name <This is blank>
Where Condition =[last name?]=[Last Name]
Window Mode Normal

That is everything that I have behind my button whenever I go into design mode on the button.
 
Last edited:
Could you post your database with some sample data, (zip it)?
 
Here you go, should be everything you need. Let me know what you think. Thanks
 

Attachments

Hmm - can only see 1 form in your database navigation pane, (no tables, reports or anything else) and yes I have selected the option, "All Access Objects".
I also need to know which report and form the report is running from.
 
There is only 1 form, that is one that loads automatically, 1 table labeled training database and the reports that I have are brought up by clicking on either of the 2 buttons. They are labeled surface training and underground training.

So if you click on surface training it will bring up the report of everyone who is trained on the surface. And from that form you can see some more buttons across the top. Open report by last name or open company report are 2 other reports where I can "drill" down and find only the people who work for company X or have the last name of Doe.

This is where I'm having the issues. I can only click on the last name report one time and after that I have to close out of that report and start all over from the main form.

Hopefully I am starting to make a little more sense, also I have unhid everything within the dbase, sorry about that.
 

Attachments

My experience has been that I can open a report with the same name only once.
To open it again with different data I need to close the report to open it again.

Dale
 
You are indeed treating a report like a form, with interacting by users!
Not I way I would do it or recommend!!
On the other way it can be done, but not in the same (easy) way if it was in a form.
I've made the needed changes in the attached database, moving the events from macro to events procedure (Sub) and added an input form for parameter and a module to hold the parameter value, so the value be used in your reports.

Only for clarifying it isn't a form but a report.
So if you click on surface training it will bring up the report of everyone who is trained on the surface. And from that form you can see some more buttons across the top. Open report by last name or open company report are 2 other reports ...
 

Attachments

That is exactly what I was looking for, I guess I couldn't accomplish what I was wanting to do with an embedded macro. There is no way I could of done that without your help. I need to start looking into vba, now all I have to do is fiddle with it a little so it can accept wildcard values instead of typing the name exactly the way it is stored in the table to get a match.

You are a life save. Thank you so much:eek:
 
... now all I have to do is fiddle with it a little so it can accept wildcard values instead of typing the name exactly the way it is stored in the table to get a match.
It would be something like below:
Me.Filter = "[last name] Like " & "'*" & GetParameterInput & "*'"
You are a life save. Thank you so much:eek:
You're welcome, luck with your project.
 
That did it, I can't thank you enough, if you're ever in souther indiana I will have to buy you a drink. Thank you once again.:D
 

Users who are viewing this thread

Back
Top Bottom