Hi all
First of all english is not my native lang.
On a school I'm managing PC that students can borrow. For each PC that is borrowed by a student, they sign a physical contract, that is scanned into a .pdf file and placed in a folder in "F:\PathToContacts\" . The PC's are named ABC001, ABC002, ABC003 etc. and the corresponding pdf's are named ABC001.pdf, ABC002.pdf, ABC003.pdf etc. (some numbers can be missing, if the PC has been retired).
The first column in the continous form is titled ABC and shows the PC names (ABC001, ABC002 etc.)
Now I have a continous form with all the PC's and I would like to have a button (or simply a text saying Yes or No) in each row that shows if the pdf exists or not?
Private Sub Form_Load()
Dim ContractPath As String
ContractPath ="F:\PathToContacts\"
If Dir(ContractPath & [ABC] & ".pdf") <> "" Then
Me.PDF.Visible = True
Else
Me.PDF.Visible = False
End If
End Sub
The above code shows the same for all records, which I found out is the value for ABC001.
Any help is highly appreciated
First of all english is not my native lang.
On a school I'm managing PC that students can borrow. For each PC that is borrowed by a student, they sign a physical contract, that is scanned into a .pdf file and placed in a folder in "F:\PathToContacts\" . The PC's are named ABC001, ABC002, ABC003 etc. and the corresponding pdf's are named ABC001.pdf, ABC002.pdf, ABC003.pdf etc. (some numbers can be missing, if the PC has been retired).
The first column in the continous form is titled ABC and shows the PC names (ABC001, ABC002 etc.)
Now I have a continous form with all the PC's and I would like to have a button (or simply a text saying Yes or No) in each row that shows if the pdf exists or not?
Private Sub Form_Load()
Dim ContractPath As String
ContractPath ="F:\PathToContacts\"
If Dir(ContractPath & [ABC] & ".pdf") <> "" Then
Me.PDF.Visible = True
Else
Me.PDF.Visible = False
End If
End Sub
The above code shows the same for all records, which I found out is the value for ABC001.
Any help is highly appreciated