Log in

View Full Version : Printing from selection lis



Farao
11-25-2022, 02:00 AM
Hi, The idea : I want to use a userform (MS access) where all the welders' names are listed with a selection box(checkboxes), by selecting a person, all the welder's certificates would then appear in the selection list next to it.
Here I would then choose which certificate to print.
The welding certificates are on the network per person in a pdf format. In the selection list, I would like to be able to see only the file name example : WPQ2522-ASME-FM5-141.pdf.
I am a newbie in vba, so we can provide me with a code please, or get me started.
thx

arnelgp
11-25-2022, 02:25 AM
the listbox should have 2 columns (having the Fullpath, hidden).
Control Source of your listbox:

select [wpqField], Mid([wpqField], InstrRev([wpqField], "\") + 1) As FileName From yourTable

Other properties (in design view)
Column Count: 2
Column Widths: 0; 1"
Bound Column: 1