Quantcast
Channel: Access for Developers forum
Viewing all articles
Browse latest Browse all 14673

Creating Multiple Records in a Table Simultaneously from a Dialog Box, Can it Be done??

$
0
0

I am working on a database idea and could do with a little help from the experts.

My database is designed to allow a user to input a series of information points about a piece of equipment (nothing special there).

At the moment each item of equipment has a record created by attaching a photograph of the item to a new record and then the user populates the information, this is all through a data input form. This process is very mandraulic as only one photo can be inputted at a time.

I am hoping to redevelop the database where the photograph is not stored as an attachment to the database but only the file reference information is stored. I have created an Image Control window in a new form that has an ADD button, which opens a file dialog box to allow me to select the photograph I want to add.(See Below)

Dim fdb As Office.FileDialog
Dim varFile As Variant
Dim k As Integer

   ' File dialog box.
   Set fdb = Application.FileDialog(msoFileDialogFilePicker)
   With fdb
      .AllowMultiSelect = True
      .Title = "IMAGE SELECT"
      .Filters.Clear
      .Filters.Add "IMAGE", "*.jpg"
     
      If .Show = True Then.....

My main questions are:

1.   How do i transfer the file reference information from the image selected in the dialog box into a new record in the table?

2. I noticed that there is the option for multiple selections in the dialog box, can I use this option to select, say, 10 pictures and use that selection to create 10 new records in my database; using something like:

          For k = 1 To fDialog.SelectedItems.Count

if this was possible it would allow for a far quicker data input?

Mick



Viewing all articles
Browse latest Browse all 14673

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>