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

Access Querry Problem

ChaseCox
100+
P: 294
OK, so what I want to do is probably very simple but I need some help. I would like be able to put something in the criteria section of a query I created that tells it to pull the information that was put into the form I created. For example I have a combo box that allows them to select different product codes, and I want my query to filter the database based on the product code they entered. Any help would be tremendously appreciated!
Nov 10 '06 #1
Share this Question
Share on Google+
6 Replies


100+
P: 112
OK, so what I want to do is probably very simple but I need some help. I would like be able to put something in the criteria section of a query I created that tells it to pull the information that was put into the form I created. For example I have a combo box that allows them to select different product codes, and I want my query to filter the database based on the product code they entered. Any help would be tremendously appreciated!
In The combobox property in the Event Tab Select after update ---Event Procedure-- and type as follows.

DoCmd.OpenQuery "Ur Query Name"
Me.Ur Combobox Name = ""


Combo box name u can find in property window others tab.
Nov 11 '06 #2

Expert 5K+
P: 8,435
OK, so what I want to do is probably very simple but I need some help. I would like be able to put something in the criteria section of a query I created that tells it to pull the information that was put into the form I created. For example I have a combo box that allows them to select different product codes, and I want my query to filter the database based on the product code they entered. Any help would be tremendously appreciated!
I think what you're looking for is something like "= [Forms]![MyForm]![MyCombo].Text". I may not have the syntax entirely correct, but the idea is that your query criteria can refer to the actual value on the form.
Nov 12 '06 #3

ADezii
Expert 5K+
P: 8,597
OK, so what I want to do is probably very simple but I need some help. I would like be able to put something in the criteria section of a query I created that tells it to pull the information that was put into the form I created. For example I have a combo box that allows them to select different product codes, and I want my query to filter the database based on the product code they entered. Any help would be tremendously appreciated!
Assuming your Form Name is frmTest and your Combo Box is named cboTest:
In the criteria row of the appropriate field of the underlying Query for your Form place =Forms![frmTest]![cboTest]
Nov 12 '06 #4

NeoPa
Expert Mod 15k+
P: 31,186
If you can provide the names of your form and the control(s) you want to use in this - as well as the fields in the dataset which would need to be compared against, then we can provide you with something to help.
Nov 12 '06 #5

NeoPa
Expert Mod 15k+
P: 31,186
The posts above should actually give you all you need.
My thread window had not been updated when I posted so I didn't see these until after my post.
Nov 12 '06 #6

ChaseCox
100+
P: 294
The posts above should actually give you all you need.
My thread window had not been updated when I posted so I didn't see these until after my post.
Thanks guys. I got it.
Nov 30 '06 #7

Post your reply

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