0

I have a form set up as follows:

A combobox called "categories"

A listbox called "moldnames"

An attachment field called "moldpic"

They all pull from a table called "Outside Master List" which contains the following columns:

ID, MoldName, Category, BoxNumber, Attachment

Selecting a category from the combobox(categories) changes the contents of the listbox(moldnames), That's all working fine.

But I have no idea how to make the attachment field(moldpic) display the image that corresponds to the item that is clicked in the listbox.

iehrlich
  • 3,572
  • 4
  • 34
  • 43
  • Is form bound to table [Outside Master List] or another table? – June7 Jul 10 '17 at 02:53
  • Hi, yes form is bound to [Outside Master List] – Frederic Raffler Jul 10 '17 at 17:37
  • So what is purpose of the listbox - to search for and move to a specific record? If yes then listbox must be UNBOUND and selected value used in code to find and goto record (or apply filter to form). Then the associated data, including the attachment, will display. Review http://www.allenbrowne.com/ser-62.html – June7 Jul 10 '17 at 17:40
  • The listbox is filtered by the combobox (categories) contents change depending on combobox selection. The intended effect is to click an item in list box and update the attachment field. I will look into the link you provided, thanks. – Frederic Raffler Jul 10 '17 at 18:28
  • Seldom makes sense to bind form to same data source a bound listbox uses as RowSource, when listbox is on that same form. What you are trying to do is modify a record with the attachment data from another record in the SAME DATASET! Why? – June7 Jul 10 '17 at 20:51
  • Because I'm new to access, learning as I go and have no idea what I'm doing. ¯\_(ツ)_/¯ – Frederic Raffler Jul 10 '17 at 21:24
  • Have you studied any introductory tutorials on Access or relational database concepts? What other tables are in the db? Let's see if I did correctly understand your form setup. 1. Form is bound to [Outside Master List] (RecordSource property)? 2. combobox and listbox both use [Outside Master List] as source for their list items (RowSource property)? 3. the combobox and listbox are bound to Category and MoldName fields (ControlSource property)? – June7 Jul 10 '17 at 21:37
  • Yes I finished an access 2106 course but have limited experience with databases. 1. is correct 2. combobox and listbox use queries as row sources, listbox querie uses combbobox value as criteria to display data. 3. is correct. – Frederic Raffler Jul 10 '17 at 23:27
  • Yes, combobox and listbox use queries as RowSource but pulling from what table - [Outside Master List]? – June7 Jul 11 '17 at 00:54
  • Yes [Outside Master List] – Frederic Raffler Jul 11 '17 at 01:15
  • Then I refer you back to my comment about how this does not make sense. I have to say you do not yet grasp the basics of relational database concepts. – June7 Jul 11 '17 at 02:41
  • I could have told you that lol. But thanks anyways. – Frederic Raffler Jul 11 '17 at 17:55

0 Answers0