473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Select multiple images and store their file paths and image names in text fields of ms access table

i have an ms access form based on a table which has 4 text fields named Image_Path1, Image_Path2, Image_Path3 & Image_Path4. On the form i have 4 command buttons to select the images and store their file path and image name in corresponding text field of table. i use the following code behind the command button
Expand|Select|Wrap|Line Numbers
  1. Dim f As Object
  2. Dim strfile As String
  3. Dim varItem As Variant
  4.  
  5. Set f = Application.FileDialog(3)
  6. f.allowMultiSelect = True
  7. If f.show Then
  8. For Each varItem In f.selectedItems
  9. strfile = Dir(varItem)
  10.  
  11. strfolder = Left(varItem, Len(varItem) - Len(strfile))
  12. MsgBox "Folder" & strfolder & vbCrLf & "File: " & strfile
  13. Me.Image_Path1 = strfolder + strfile
  14. Next
  15. End If
  16. Set f = Nothing
  17. End Sub
My Question is ...
how i can i use only one command button to select all the four images and store their file path and image in one go ?
The database is attachedhttp://www.4shared.com/s/fuhH73p7giq
Thanks
Feb 27 '22 #1
0 8960

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wade | last post by:
08242005 1416 GMT-5 Recently some of you helped me with a script to change images. Well I was asked to make a change to the script and not knowing if what the school system is even possible, Ill...
1
by: DaveA | last post by:
Our incident numbering system is based on the following YEAR 05 MONTH 06 NMBR 1234 looks like 05-06-1234 the counter number is manually reset each month and I would like to make it...
2
by: kkant | last post by:
Hi , I am KKant from Bangalore, India. I have a jos to do, I have to store VB codes in a a Database (Access) table and in Run time I have to read those codes and Exute them. But I dont know how to...
2
by: Marcolino | last post by:
Hi all, I have an application that needs to import XML files into Database. This XML file was generated by this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
2
by: sarayu | last post by:
Hi All, How can i select multiple images by using shift or control key from my hard disk and upload it by using a submit button.For this what we use for selecting different images and...
0
by: phuongnguyen203 | last post by:
I'm using StarDoc , EndDoc to print text rotation and image, but i print text only. Here my code: hPrintDc = CreateDC(Printer.DriverName, Printer.DeviceName, 0, 0) result =...
1
by: chintu4love | last post by:
Hi All, I happened to run a report from a mainframe and I get the report in a form of text file everyday. I need only specific data from the whole report and the text file is not delimited or in...
1
by: MichaelHooker | last post by:
At this topic "https://bytes.com/topic/visual-basic-net/answers/530817-convert-access-table-text-file-using-vb" is the following Q&A: ====================================== "I have a MS access...
11
twinnyfo
by: twinnyfo | last post by:
The later versions of MS Access have a field type called Attachment. This allows the user to "upload" documents and images into the database, so that all things are stored neatly in one place....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.