Access images form

0

I have a field in an Access table of type Attachments where I store several images for the same record. I need to present in a form all the images associated with a record, in such a way that 4 or 5 images can be visualized at the same time, that is, that more or less I would need that in the window of the form the images could be visualized as it does Windows Explorer when you present a folder of images with the view of very large icons.

Does anyone know how I can do it?

    
asked by Rsg 08.11.2016 в 13:13
source

2 answers

1

The following text is copied directly from Microsoft Office Help:

  
  • In the navigation pane, right-click on the form or report you want to change and click on Design View in the context menu.

  •   
  • On the Design tab, in the Tools group, click Add existing fields.

  •   
  • The Field List panel appears, which includes the fields in the table that provide the data for the form or report. The list represents the fields of attachments as expandable (that is, you can click on the plus or minus sign next to the field).

  •   
  • The following illustration shows a typical attachment field in the Field List panel.

  •   
  • An attachment field in the Field List panel

  •   
  • Drag the entire attachment field from the list to the form (the primary and secondary elements) and place it in the desired location of the form.

  •   
  • Access takes care of placing an attachment control on the form and linking the control to the table field.

  •   
  • If necessary, right-click the control, and then select Properties to display the control's property sheet. Set or change the properties of the control to correspond to the rest of the form or report.

  •   
  • Save the changes, and then right-click the document tab and click View Form or Report View to open the form or report and view it.

  •   
  • If the underlying field contains image files, the control represents those files. If the field contains another type of file, such as a Word document or a PowerPoint presentation, the control displays the icon corresponding to the file type.

  •   

    You can check all the OLE type data help in the following access:

    Help OLE Access objects

        
    answered by 08.11.2016 в 15:04
    0

    First, I do not recommend using the type of attachments because they tend to overload the base . And when a base in Access weighs a lot, it runs slower, and can end up corrupting with 2 GB of weight . I recommend using hyperlinks to folders where you have the images and so on, but that the attachments are outside the base itself.

    Now, regarding your query, a simple way to solve it would be using 2 tables: In a table you would have the information of the records, excluding the attachments. Then, in a secondary table, related to the first, you would have the attachments associated with each record of the main table, only putting 1 attachment per record in this secondary table, but creating all the ones you need (if you have 6 images, then create 6 records in this secondary table, associated with the record that interests you in the main table).

    After this messy explanation, I'll give you my example.

    I have created a very simple base. I have a main table called MIS_REGISTROS. There I give the important information, without the attachments . You will see that I have created 3 records:

    Then, I created a secondary table, called TABLA_ADJUNTOS, where I link attachments (1 per record) to each record in the table MIS_REGISTROS:

    It is worth noting that, looking at the upper screen, we can see that FIRST RECORD has associated 3 attached files, SECOND REGISTER has 2 and THIRD RECORD has 1 only.

    Next, we create a form for the table MIS_ADJUNTOS. In my case, I have deleted all the fields in the Detail of the form, except for the control of the attachment. IMPORTANT : I've set the Default View property of this form to continuous forms .

    Then I designed the main form, based on the table MIS_REGISTROS. And there, I insert the form of the attachments as a subform, linking the fields.

    And that's it. With this, I see all the images associated with each record in my MIS_REGISTROS table. For example, let's look at the first record: (remember that it had 3 attachments):

    And now we're going to move to the third record (which had 1 attachment only):

    This way could allow you, in a simple and easy way, without programming in VBA, to show the images.

    You will have to play with the sizes and other forms that you use as a subform to fit the 6 images on the screen, but that is to touch and try.

    I hope it can help you out of something. But I reiterate my professional recommendation at the beginning of the answer. Better to use hyperlinks to images in Windows folders than to add them as attachments to the base.

        
    answered by 07.05.2018 в 21:26