Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Parameter Query < DatePart | Prevent Duplicates >
Back to Parameter Query    Comments List
Upload Images   @Reply   Bookmark    Link   Email  
Struggling with Parameter Query
Kyle Rapp 
    
6 months ago
Hi Guys, I understand how we can put a parameter in the criteria row to ask for input and use that input to filter that field in the query.  The problem is I need to create a field in the query, store some input in that field, and then use that field's value (from what was input) as part of a dcount in another field in the query.  Is that possible?  I was thinking I would just create a field called "StartDate:" and set that field value equal to the input but can't seem to figure out how.  Thanks in advance.
Kyle Rapp OP  @Reply  
    
6 months ago
Quick update.  I have a field in the query that asks for a Date.  That works because when I run the query, I do get a popup box and the date I typed into the popup box does show correctly in that field in the query resullts.  I named that field StartDate:.

The problem is, the other query field that has the Dcount in it, needs to reference that start date and when I type [StartDate] in the dcount, it cannot find the field named [StartDate] even tho that is the name of that field.  I'm sure this is something silly I am missing.
Thomas Gonder  @Reply  
       
6 months ago
@ Kyle  In one of Richard's videos on parameter queries he shows how to get a value from a Form to stuff into a query. That's a more aesthetic approach for users. I've never tried pulling a value from a query much less from the criteria for one. It may be possible (using the query name instead of the form name), but I wouldn't waste my time as I don't directly present users with queries. Forms and reports are meant for users, IMHO. With a form, you can verify that a date was entered and not some gibberish.
Kyle Rapp OP  @Reply  
    
5 months ago
ok gotcha...so basically a small form with an unbound field with an inputbox behind it.  Then a variable would be set to the inputted value, then open the query and pass that value into the query?  Something like that?
Alex Hedley  @Reply  
            
5 months ago
Alex Hedley  @Reply  
            
5 months ago
Kyle Rapp OP  @Reply  
    
5 months ago
Thank you everyone.  I ended up creating a button on my main menu, which opens a small, unbound form with 2 unbound fields.  (start date and end date)  I have a button on that small pop up form to create tempvars for start date and end date, setting the tempvars equal to the values from the start date and end date fields on the popup form.  Then it opens the query.  I have added those 2 tempvars as parameters in the query and that did the trick.  Working well.  Thanks for the help.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Parameter Query.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/14/2025 7:03:02 PM. PLT: 1s