Solved Show Saved Folder & Its Contain On of Access Form (1 Viewer)

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Hi,

I am looking into the possibilities of showing relevant employee folder on MS Access form. Could this be possible?

I am sending a pdf format warning letter to employee by EMAIL attachment. I am expecting employee will print it and sign it as his acceptance and then send scanned copy to me by email.

So once I receives his email I want to save his signed attachment in to a folder saved somewhere OR in the same folder where I place my current db.

Now what I am looking for is to display that particular emp. folder in a counter window on the form from where I sent him this warning letter.

Is this possible in Access?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
Hi. Not sure I understand your question but maybe try using a web browser control.
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Let us say a pdf format warning letter is being sent to employee by autoemail from Access db. The Criteria of violations are as follows
Lates
Absent
Violations
Misconduct.

When employee will receives email he will surely print it on paper. He will sign it and he will send scanned copy to me. This scanned copy I need to put in a folder (folder name is identified by employee numbers.) I will manually save that signed letter (received pdf file from emp) into the folder I created or in my documents. Let us say I sent warning letter to emp 1034. Upon his return email to me I will copy his signed letter in a folder called 1034.

So this folder I wanted to show in a counter in Access forms once the form is open and I calls emp 1034 on form him folder shall be displayed in a window.. This is tha facitly I was looking.?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
Yes, sounds like you could try using a web browser control. Give it a shot and let us know how it goes.
 

bastanu

Registered User.
Local time
Today, 03:28
Joined
Apr 13, 2010
Messages
593
Yes, it can be done relatively easy. On the Current event of the form you need to call a sub that uses Dir or other method to list the files in the folder named "\\YourNetworkShare\...\EmployeeFolders\" & Me.EmployeeNumber and populate a list box with those names. In that listbox double click event you can then add code to open the files using some interpretation of shellexecute or FollowHyperlink.

Cheers,
Vlad
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
So this folder I wanted to show in a counter in Access forms once the form is open and I calls emp 1034 on form him folder shall be displayed in a window.. This is tha facitly I was looking.?
Are you looking for something like this?

1606848990889.png
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Exactly theDBguy,

I am looking for same what you attached. But only one folder of concerned employee. Let say if I select an employee # 1034 from combo, it a small counter like yours it should display his folder (which is named as 1034). This is to facilitate to user to click the folder from that window and check how many previously letter signed by him.

Placing received letters in the folder could be manual.

Please let me have sample db if you can or Code at least.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
Exactly theDBguy,

I am looking for same what you attached. But only one folder of concerned employee. Let say if I select an employee # 1034 from combo, it a small counter like yours it should display his folder (which is named as 1034). This is to facilitate to user to click the folder from that window and check how many previously letter signed by him.

Placing received letters in the folder could be manual.

Please let me have sample db if you can or Code at least.
Okay, all I did was use a web browser control. To display a specific folder, you can try the following code.
Code:
Me.WebBrowserName.Navigate "c:\foldername"
Hope that helps...
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 03:28
Joined
Nov 8, 2005
Messages
3,234
I might be able to assist
on your form have a unbound field called Folderlocation (this will be the control source of your webbrowser



then after update from however you find the record have
me.folderlocation ="S:\Employee\xxxxx\ "& me.employee id\" network drive to folder location and subfolder will be Employeeid
webrowser requery
me.refresh

that should do it ..
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Hi,

I tired the way both theDBGuy And Gary described above. I came across Run-Time error-13.

I temp created few folders by emp number only you may see the attached pic.
 

Attachments

  • 1-Code Erorr.jpg
    1-Code Erorr.jpg
    44.4 KB · Views: 19
  • 2-Folder Loacation.jpg
    2-Folder Loacation.jpg
    82.6 KB · Views: 20
  • 3-Displayed Web Browser.jpg
    3-Displayed Web Browser.jpg
    20.1 KB · Views: 19

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
Hi,

I tired the way both theDBGuy And Gary described above. I came across Run-Time error-13.

I temp created few folders by emp number only you may see the attached pic.
Hi. Your folder name has the emp name in it, but your code only has the CNo. So, they don't match.
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Yes you are correct. Therefore, I changed to below

Me.FolderLocation = "D:\Ashfaque\" & Me.CNo & " - " & Me.CName '"\

this one is displaying path in text box folderlocation. Both Cno and Cname it is capturing from current form.

But doesnt it mean that folderlocation is filled up by only emp number and name because there is no effect in web browser...I mean nothing is showing in Web Browser
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
I think this thread should move to Module & VBA section.....

Can Admin please move it..?
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
DONE.......

Thank you very much ThedbGuy & Gary......
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
I might be able to assist
on your form have a unbound field called Folderlocation (this will be the control source of your webbrowser



then after update from however you find the record have
me.folderlocation ="S:\Employee\xxxxx\ "& me.employee id\" network drive to folder location and subfolder will be Employeeid
webrowser requery
me.refresh

that should do it ..
Our employee files are kept on file server its path is : \\inat\Admin HR\EMPLOYEES
and in this folder almost 150 employees sub-folders. Each sub-folder has particular id means....let us say emp 1034..his folder is named as
INAT-1102 Noel Sanchez
INAT-1100 Ruel Lacopia
But in my Access db, only employee names IN TABLE. To cover this I used below path but not working

Me.FolderLocation = "\\inat\Admin HR\EMPLOYEES\"INAT-" & Me.CNo & Me.CName"\

this produces syntax error
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
Our employee files are kept on file server its path is : \\inat\Admin HR\EMPLOYEES
and in this folder almost 150 employees sub-folders. Each sub-folder has particular id means....let us say emp 1034..his folder is named as
INAT-1102 Noel Sanchez
INAT-1100 Ruel Lacopia
But in my Access db, only employee names IN TABLE. To cover this I used below path but not working

Me.FolderLocation = "\\inat\Admin HR\EMPLOYEES\"INAT-" & Me.CNo & Me.CName"\

this produces syntax error
Your quotes are all over the place, and you may be missing a space between the number and the name.
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
I have checked the folder names. There is no gap before and after "-"
"\\inat\Admin HR\EMPLOYEES\

In this EMPLOYEES folder there are number of folder like
INAT-1102 Noel Sanchez
INAT-1100 Ruel Lacopia
and so on...
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:28
Joined
Oct 29, 2018
Messages
14,191
I have checked the folder names. There is no gap before and after "-"
"\\inat\Admin HR\EMPLOYEES\

In this EMPLOYEES folder there are number of folder like
INAT-1102 Noel Sanchez
INAT-1100 Ruel Lacopia
and so on...
What about the names? There's a gap between Noel and Sanchez.
 

Ashfaque

Student
Local time
Today, 16:58
Joined
Sep 6, 2004
Messages
696
Yes there is. Bcz 1102 have combination of 2 words. Simillarly some of them have 3 and some 4 words.....
But initial word before emp number is fixed (INAT-) this is fixed with all emp.
 

Users who are viewing this thread

Top Bottom