By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

how to open a form with filtered records by certain date?

P: 18
i had a database
need to open form with a filtered records by certain date ( as there is a field for date )
any help ??
Sep 20 '17 #1

✓ answered by Seth Schrock

You would need a textbox on your form with the button. You would enter the date that you want in that textbox and then click your button. Just make sure to change the name of your textbox in the code to match the name of the control on the form.

Share this Question
Share on Google+
3 Replies


Seth Schrock
Expert 2.5K+
P: 2,937
If you are using a button to open the form, then you would just provide a WhereCondition argument to your DoCmd.OpenForm code line. Something like this:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "Your_Form_Name",,,"Date_Field = #" & Me.Date_control & "#"
Sep 20 '17 #2

P: 18
fine thats greaaat but how i will choose these certain date ??
could you explain to me ( me.date_control) ??
thanks in advance
Sep 20 '17 #3

Seth Schrock
Expert 2.5K+
P: 2,937
You would need a textbox on your form with the button. You would enter the date that you want in that textbox and then click your button. Just make sure to change the name of your textbox in the code to match the name of the control on the form.
Sep 20 '17 #4

Post your reply

Sign in to post your reply or Sign up for a free account.