- combos and lists are indexed starting with 0, so to refer to the second column, you use 1. I don't think queries are fond of referring to columns of combos, but using the Eval function should do the trick.
in the subform it displays #name, it should be agent name this is what it is in the table but the cbo is called employee(not got round to change this yet)
however ive taken a slightly different slant, in my query ive got
AgentName(hidden) Department, Compliance agent etc...
So... cboEmployee is selected and requeries the subform, the subform runs the query and displays the results i want, which is great, however the results are showing the ID, i want it to show the text value, now i have another query which should be in that uploaded version, this query brings all the tables together with the tblMaster so when run it shows the text values, do you know how i can combine this with the subform query?
sorry to sound confusing to explain in a nutshell i want the sub form to return text values based on the selection from cboemployee
When a form is bound to a table or query (or an SQL string, or the recordset is assigned thru an ADO/DAO recordset) you can only bind the controls of the form to actual field names exposed by those objects.
Bind the control to the correct field. If this is still returning the ID, I'll guess you're using table level lookups. See http://www.mvps.org/access/lookupfields.htm for why those aren't exactly encouraged. If you continue using them, you'll need to make sure the table containing the real name you're after (what is looked up in the table level lookup) is included and referenced in the query, and select the <whatever>Name field as one of the fields to be outputted.
you know thinking about it, all the problems im getting are because of these lookup links,
the reason i have this structure is because on the main form i have a cbo Employeename, this then automatically selects the following two cbo Manager and Department, likewise if Department is selected this filters manager cbo for all managers in this department and the same is applied to employee.
If i was to change the structure how would you recommend i do it?