Re: Write text from a list box to a table in MS Access 2003 (VBA)

TrajanCarnage

New member
Local time
Today, 13:30
Joined
Nov 20, 2006
Messages
3
Re: Write text from a list box to a table in MS Access 2003 (VBA)

Dear Community,

I am trying to create an application that will allow the user to view a catalogue of photographs through Microsoft Access. Instead of placing each picture into the database as a blob object, I have decided to include the file path (string) indicating where the photos reside on the hard drive (to save space).

The app is set up so that when a user clicks a button, a file dialog pops up and allows the user to choose photos (their paths) for upload into the database. Currently, the chosen file paths are displayed in a list box.

My question: How do I transfer each individual path name from the list box to its own record in the database table?

I believe it has something to do with recordsets and the TransferText method. Any help or advice you could give would be most sincerely appreciated.

Cheers,

Andrew:)

Kitchener, Ontario, CANADA
 
Just as for a combo box, a list box can have a bound column. When you click on an item in the list, the value of the list box will be the value of the bound column item. eg FileToOpen = Me.FileList.Value

You can then therefore run code that opens the file at the address of the file cliicked on in your list.
 
Thx Summerwind. I will give it a try and let you know how it works!

Cheers,
Andrew
 

Users who are viewing this thread

Back
Top Bottom