daveUK
03-02-2002, 02:21 AM
I'm designing a database that allows users to serach, view and store digital photographs. The main form showing all the stored images is frmPhoto and works fine. I have a subform (Category/Photo subform) that is linked to frmPhoto using the Photo ID field (Primary Key) as a link and this displays all of the Categories of the Photos. This also works OK. My problem is the second subform, which displays the sub-categories(sub-category subform). It's linked to the Category/Photo subform so that everytime the Category changes, only the relevant sub-categories are displayed. i.e. when the user selects the category Nature on the 1st subform (main Category), the 2nd subform (sub-category) allows the user to choose either Animals or Scenery.
I've used the following code on the Change and GotFocus properties of the Category/Photo subform
[Forms]![frmPhoto]![Sub-Category subform].Requery
My problem is that the sub-category subform isn't 'remembering' the value that I choose for the Photo.
i.e. When I choose the Category 'Nature' and sub-category 'Scenery' for a Photo, the next time I open the main form (frmPhoto), the category 'Nature' is still there, but the sub-category 'Animals' is displayed. This is the first record for the category Nature and Scenery is the second.
Any ideas???
Dave
I've used the following code on the Change and GotFocus properties of the Category/Photo subform
[Forms]![frmPhoto]![Sub-Category subform].Requery
My problem is that the sub-category subform isn't 'remembering' the value that I choose for the Photo.
i.e. When I choose the Category 'Nature' and sub-category 'Scenery' for a Photo, the next time I open the main form (frmPhoto), the category 'Nature' is still there, but the sub-category 'Animals' is displayed. This is the first record for the category Nature and Scenery is the second.
Any ideas???
Dave