Link to home
Start Free TrialLog in
Avatar of AisinAuto
AisinAuto

asked on

Selecting a second colum in access

I created a table, Repair_Type2, that has two columns.  The first one is Repair Type and the second is Quality.  This table is used as list for a combo box in the main table.  When a user is selecting a reason in the main table from this list they are only using the first column.  The reason for the second column is that some not all of the reasons in the first column have the word quality in the second column and we need the second reason selected each time that an appropriate reason the first column is selected.  I have this part working.  What i need is to have a query that looks all the records but only displays the ones that has the word quality asscociated with them for the second column.  I have created a query that has what i need but i don't know how to get it to look at the second column from the Repair_Type2 field.
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

we need the second reason selected each time that an appropriate reason the first column is selected.
What do you mean here.  How are you selecting the 2nd column? Are there 2 combo boxes?
Avatar of AisinAuto
AisinAuto

ASKER

The field in the table is setup for both columns.  Bound Column = 1 ;  Column Count = 2
Sorry but that still doesn't make sense. You have a combo box with a ColumnCount of 2 whose RowSource is the table Repair_Type2 and it's bound to the column RepairType, right?  If so, what does it mean to have a second reason selected each time an appropriate reason in the first column is selected?  Are you saying that the whole row gets selected?  That would be normal, so I'm not following.  

Perhaps if you post some sample data, it may help to understand what you're trying to accomplish.
I have attached a copy of the database.  The form for entry is Main and then there is a form labled History for all the history.  The query is Die_confirm
Die-Tracker.mdb
Did you mean you want the combo box called Repair Type 2 to show only the records that have quality in the second column?
Yes
Then the RowSource for your that combo box should be"
SELECT [Repair Type 2], Quality FROM Repair_Type2 WHERE Quality="quality"

Open in new window

I added the line you gave as the row source and now all the reasons in the first column have quality listed next to them in the second column.  I have attached an excel sheet with screen shots.
book5.xls
I thought you wanted the Repair Type 2 combo box to show the records that have quality in the 2nd column.  Are you saying this is right except you don't want to see the 2nd column?  If so, then change its ColumnCount property to 1.  If this is not right then please explain further.
What i need is for when a user creates a new record and chooses a reason from the field Repair_Type2 that if i have associated the word quality with it in the secomd column that is chosen automatically for them.  I don't want quality picked with every new record only the ones that i have quality in the second column with.  I need this for a another form that i have created, Die Confirmation Check Sheet.  I need this sheet to only displays the records that were created and a reason was chosen from Repair_Type2 that had quality associated with it.
Sorry, but I'm not understanding your process about it being chosen automatically for them.  Let's see if other experts could chime in to help you out.
<<What i need is for when a user creates a new record and chooses a reason from the field Repair_Type2 that if i have associated the word quality with it in the secomd column that is chosen automatically for them. >>

Not quite getting that.  What would automatically be choosen for them based on the word "quality" being in the second field?

Jim.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial