I attached two pictures. One is the form I am having issues with and the other shows my database relationships.
Question 1 - The first issue I am having is when the category is updated on the form, I want to populate the
[Boxes].[Directory_ID] with the correct [Directory].[ID]. The directory ID is in the hidden column of the Category combo box
which has the Directory table as its source. What I did was try to setvalue of Directory_ID by the amount hidden in the other
column of the category combo box. It didn't work. Was I on the right track? I did check to see if I was getting a value for
the hidden column by using a text box on my form.
Extra Information = The form source is the Boxes table.
The Box Number text field, Category combo box, RecordFYE text field, scanned field, and subform
are bound to the boxes table but the rest are unbound.
Question 2 - Since three of the combo boxes are unbound (Department, Division, and Function), they always start blank. What I
would like them to do is default to the value based on the category_ID of the record. In the picture it shows them filled in
but that was because I selected the information.
Extra Information = The division, function and category combo boxes are all sorted based on the entry from the combo box
above them. For example, what you select in Department will only show the Divisions for that department. I do this by
filtering the row source.
Reply With Quote
08-02-2012, 05:31 PM
Windows XP Access 2010 32bit
Join Date May 2011
Location The Great Land
Not understanding data and form structure. I don't see a Category_ID field in the tables. Why would Directory_ID from
Boxes be in the Category combobox RowSource?
Show the RowSource sql of the Category combobox. Show BoundColumn and ControlSource properties.
Is the Category RowSource controlled by selections of Department, Division, Function (cascading comboboxes)?
Want to provide db for analysis? Follow instructions at bottom of my post.
Options to display related data that is dependent on key in a combobox:
Form RecordSource is a query that joins the tables, jointype 'Show all records from ...". Then fields are available to
ControlSource in textboxes.
The combobox includes the fields in its RowSource. Textbox ControlSource expression refers to the relevent column of
Textbox ControlSource is a DLookup expression (doable but not recommended).