File location in a field

Discuss the database features

File location in a field

Postby Dropout » Wed Aug 21, 2019 6:30 pm

Hi all

I need to have a file location in a field. Just text - no need for a link at all, just the text of the location - like C:\User\Data\Part\12345.dxf

I don't want to have to type in 600 or so of these file locations but would rather be able to search for them.

Any ideas?
OOo 2.4.X on MS Windows Vista
Dropout
 
Posts: 17
Joined: Tue Sep 23, 2008 10:49 pm

Re: File location in a field

Postby UnklDonald418 » Wed Aug 21, 2019 11:00 pm

On the Form Controls toolbar along the left margin in the form Design mode select More Controls to open a popup menu. There is a File Selection (File Picker) control that you can connect to a text field in your database.
It will allow you to Browse for a file name, no typing required.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1321
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: File location in a field

Postby Dropout » Wed Aug 21, 2019 11:01 pm

Thanks.

Will try that out.
OOo 2.4.X on MS Windows Vista
Dropout
 
Posts: 17
Joined: Tue Sep 23, 2008 10:49 pm

Re: File location in a field

Postby Villeroy » Wed Aug 21, 2019 11:42 pm

The attached database document contains a macro, a table and a form.
The form has a button.
The button has an additional information "P" which is the name of the path column in the database table.
The button is bound to the macro stored within the database document.
The macro reads the field name from its property "Additional information", reads the text from that column in the current record and pops up a file picker dialog.
The directory where the search starts is the path of the existing text. If there is no text or the text does not point to an existing directory the search starts in the same directory where the database document is stored.
You may edit the constants on top of the Basic module which declare the label of the file picker dialog, the displayed label of the file type list box and the shell pattern which filters the displayed files in a directory.
Attachments
FilePicker.odb
File picker button on a form
(14.1 KiB) Downloaded 31 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28422
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 5 guests