And I forgot - thanks to GDGarth for the original suggestion to get the data for the query using a form! Something I've never had to do before. You guys are the best [smile]
YAAAAY!!!! It worked! The reason that Pauls original suggestion didn't work for me is... drumroll... I forgot to change the name of the text field in the form! Duh... It was still set to "Text0"... So when I changed it to txtLocation and changed it in the query, it works PERFECTLY...
Original query as Paul suggested (yes, I took the default form name "Form1" due to laziness, LOL!):
SELECT Locations.Location, Locations.City, Locations.ST
FROM Locations
WHERE (((Locations.Location)=[Forms]![Form1]![Location]));
-------
Form1 code (with button to run the report)...
Ack!
Ok...
Mike - it works switching the parameters like you said, but only when I run the query - if I run the report, it asks Enter Store Number AND qry.Locations.Location, and it asks both things twice. There is no sort on the query.
Paul - if I have no value in the form field, and just run...
Well... It's an "unrelated" subreport - I have a database of store layouts with part numbers, prices, etc. The main report pulls all of that together. But in the header of the report, I want to put the Store Location Number, and then from that number, automatically pull the city and...
Geez... I have it halfway working. I have a form with just a text box for input. Then in the query, I put it in the criteria as [Forms]![Form]![Field] - of course with my field & form names. On the form, I have tried a button to run the report, and also tried a macro "after update" to...
Hey, another interesting tidbit... When you "preview" the report, it asks twice for the Location. Then if you print it, it asks 3 more times!!! This is going to peeve my users if I can't figure it out [sad]
Well, the sorting/grouping looks ok - the rest of the report runs normally. There are no sorting/grouping options shown in the main report for the Location subreport. I even went into the subreport and did a group by Location but that didn't help. I can't figure out why the subreport runs...
Hmmm... Yes, one parameter in one query. Then that query is in a subreport, which is in the Report Header section of my main report. Running the query or subreport alone brings up only one prompt. Running the main report makes it prompt twice...
I tried your suggestion - deleting the column...
Hi again,
No VB or SQL here - just using Access' built-ins. The field is Location. In the parameter query, the criteria is [Enter Store Number]. Then the qry also pulls in city and state. Works just fine.
I have a report with unrelated data from an unrelated table. I want the user to be able...
Leslie,
You are the best! I set up a fake table with some layout numbers. Made a query with your SQL statement to get all the values in the table. Added that query to my original query that dumps data to my report. Joined the Layout field from the new query with the Layout field in the original...
Hi! I'm working on an inventory mgmt db and need to query for a group of layout numbers, each consisting of many part numbers. I have a parameter query set up - basically you enter the layout number and it brings up the list of part numbers needed for the layout. NOW... How can I enter more than...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.