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

Query Using information from current line of a table

P: 5
This is my first post here so if you need more information please ask.

What I'm trying to do is build safeties into a database. What I want to do is have a combo box in the table that will only allow certain selections baised on another column in the table.

I can get it to limit if I use a form to get the cirteria, but I want it to grab the cirteria from the curren row of the table that I'm working in. Any ideas or help would be appriciated

Also I'm using Access 2003

Alia
Dec 26 '07 #1
Share this Question
Share on Google+
2 Replies


jaxjagfan
Expert 100+
P: 254
This is my first post here so if you need more information please ask.

What I'm trying to do is build safeties into a database. What I want to do is have a combo box in the table that will only allow certain selections baised on another column in the table.

I can get it to limit if I use a form to get the cirteria, but I want it to grab the cirteria from the curren row of the table that I'm working in. Any ideas or help would be appriciated

Also I'm using Access 2003

Alia
Are your comboboxes based on tables as their data source? If so is the criteria value a column in the tables? Is one combo limiting/extending choices available in the next? Having a structure based on tables vice values allows you or users to add values and change criteria without changing code.

My end users maintain these tables since they know the business processes. I just have to maintain the application.

On the AfterUpdate property of the TextBox or Combo that is used as criteria you will need to requery the combobox that is being limited or extended.

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCombo1_AfterUpdate()
  2.  
  3. Me.YourCombo2Name.Requery
  4.  
  5. End Sub
  6.  
Dec 26 '07 #2

P: 5
The Combo box is baised on a query of another table, but I want the criteria of the query to be the previous column in the same row of the current table.

Basically I have one table that lists all employees and lists what jobs they can do. Then in another table I want to select one of the positions and have the combo box in the next column only list thoes employess that can fill that position.
Dec 26 '07 #3

Post your reply

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