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

Filtering a form from another form

P: 8
Hi all,

I currently have a database that has a form for input, I have created another form that looks identical to this one looking at the same data in the same tables however only one thing is selectable/changeable as this is a "review form"

I would like to create a form for users to use to select a date from a list that then (by pressing a command button) takes the seltected date and filters the review form by this date.

Can anyone tell me if this is possible and if so how to do it. I have tried many different things so far and nothing seems to work.

Thanks in advance
Mar 10 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 184
let's assume your Input Form is named frmInput and your Review Form is named frmReview.

Then now let's name your Combo box (if i got that right) for the dates as cboDate and your command button named as cmdFilter.

In the frmReview Form is a field named txtDate

Now what user will do is to select a date from the cboDate in the frmInput, then click cmdFilter button and it will open frmReview with only records that has the txtDate field matching the date selected by the user in the cboDate from the frmInput.

if I got this right, then you just have to program your cmdFilter to open the form and put a WHERE condition.

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdFilter_Click()
  2. Docmd.OpenForm "frmReview", , , txtDate = "Me!cboDate"
  3. End Sub

The only thing I am not really sure for I don't have MS Access in my PC right now is the actual number of comma (,) inbetween so try adding one or removing one and see which works.
Aug 19 '08 #2

Post your reply

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