Solved File exist button in continous form

The database should be split - the data in tables in the backend (BE) and located on a server where users have access and everything else (forms, queries, reports, modules) in the front end (FE) and a copy located on each users local machine.

Unless you clarify why not, the pdf's should be in a folder on the server - perhaps in the same folder as the BE

and you don't need any code with regards what to show

in a textbox control in the detail section, put

=Dir(ContractPath & [ABC] & ".pdf") <> ""

change names to suit.

And in the controls format property put

;"Yes","No"

if you want colour use

;[Green]"Yes",[Red]"No"
Our Database is actually split, the backend is a Sharepoint List, and the pdf's are already located in a subfolder on the same sharepoint
 
you are still not being very clear:

And the sharepoint path looks like this:
C:\Users\MyName\SharepointName\IT - General

is MyName the name of the user? or your name i.e.

C:\Users\dk_bhn\SharepointName\IT - General

and if so - do users have access to this folder?
 
So what is the error it produces?
I cannot see anything wrong with that path, other than perhaps any spaces?
Have you tried a path without spaces?
 
you are still not being very clear:



is MyName the name of the user? or your name i.e.

C:\Users\dk_bhn\SharepointName\IT - General

and if so - do users have access to this folder?
Yes it's like that. But it's a syncronized folder from sharepoint, which means that for instance my colleague LAB, will have access to the same folders on his pc, but on his pc, they'll be located in C:\Users\LAB\SharepointName\IT - General
That's why I want to use something like Environ$("USERPROFILE") & "\SharepointName\IT - General\"
 
So what is the error it produces?
I cannot see anything wrong with that path, other than perhaps any spaces?
Have you tried a path without spaces?
I get this error when I try to use the Environ$ in the module:

1728736548737.png
 
you can't use a Function() when you are declaring a Constant.
 
you can't use a Function() when you are declaring a Constant.
Yeah, I did Dim p as String, and set p to Environ$("USERPROFILE") & "\..." And now it works.

Again thankyou for your help.
 

Users who are viewing this thread

Back
Top Bottom