Simple Folder Select

D

dan.cawthorne

I Have a Bound Text Field on my form called FolderLocation,

What i want to do is add a button next to this field which will enable
me to select and store the folder location for that current record,
can this be done?

Ive been trying to search for similar functions, but cant seem to find
something like, or the instructions seem a little brief on how to call
for modules etc.

Secondly i have some code which creates a folder with sub-folders in
the Location of P:Quotations\

and it names the folders from 2 fields in the related table. in that
table i also have the field FolderLocation. Is their a way once I've
created the folders by click the command button i can automatically
store the created folder and location path in the field
Folderlocation?
 
D

dan.cawthorne

I Have a Bound Text Field on my form called FolderLocation,

What i want to do is add a button next to this field which will enable
me to select and store the folder location for that current record,
can this be done?

Ive been trying to search for similar functions, but cant seem to find
something like, or the instructions seem a little brief on how to call
for modules etc.

Secondly i have some code which creates a folder with sub-folders  in
the Location of P:Quotations\

and it names the folders from 2 fields in the related table. in that
table i also have the field FolderLocation. Is their a way once I've
created the folders by click the command button i can automatically
store the created folder and location path in the field
Folderlocation?

Just to let you know i have now managed to sort the folder select
option,

But still need some assistance in the second question?

Regards

Dan
 
D

dan.cawthorne

Just to let you know i have now managed to sort the folder select
option,

But still need some assistance in the second question?

Regards

Dan

Some one must have some insight into how i can automaticaly store the
folder location which has just been created by mkedir command, don't
really want go back and select the folder location manually to that
current record, and for every new record i create.
 
J

John W. Vinson

Some one must have some insight into how i can automaticaly store the
folder location which has just been created by mkedir command, don't
really want go back and select the folder location manually to that
current record, and for every new record i create.

Please post your code. Nobody here can see how you're using mkdir.
 
D

dan.cawthorne

Please post your code. Nobody here can see how you're using mkdir.

Sorry John,

My mkdir code is below and works perfectly fine,

Private Sub CmdMakeFolder_Click()
On Error GoTo PROC_ERR

Dim myPath As String
myPath = "P:\QUOTATIONS\" & Me.[ProjectQNo] & " - " & Me.
[ProjectTitle]
MkDir myPath
MkDir myPath & "\Estimate"
MkDir myPath & "\Submission"
MkDir myPath & "\Tender Info"
MkDir myPath & "\Quotes"
MkDir myPath & "\Enquirys"

DoCmd.OpenForm "frm_MakefolderSuccesful"

PROC_EXIT:
Exit Sub
PROC_ERR:
If err.Number = 2101 Then
Else
Msgbox "Folder Has Been Already Been Created"
End If

End Sub

So i need some sort of update query which will update tblProjects
Field "Folderlocation" with some like "P:\QUOTATIONS\" & Me.
[ProjectQNo] & " - " & Me.[ProjectTitle] after folder created.
 
J

John W. Vinson

So i need some sort of update query which will update tblProjects
Field "Folderlocation" with some like "P:\QUOTATIONS\" & Me.
[ProjectQNo] & " - " & Me.[ProjectTitle] after folder created.

As long as you have all the information in this code, if there is a control on
the form for FolderLocation, just set it to that string.

If not, just open a Recordset based on the table. Use the Update method if you
want to update (overwrite) an existing field value, or the AddNew method if
you want to add a new record into tblProjects. Again - *I don't know the
context*. I have no idea what this Form is doing, whether tblProjects is its
recordsource or totally unrelated... and my crystal ball is in the shop for
repairs! <g>
 
D

dan.cawthorne

So i need some sort of update query which will update tblProjects
Field "Folderlocation" with some like "P:\QUOTATIONS\" & Me.
[ProjectQNo] & " - " & Me.[ProjectTitle] after folder created.

As long as you have all the information in this code, if there is a control on
the form for FolderLocation, just set it to that string.

If not, just open a Recordset based on the table. Use the Update method if you
want to update (overwrite) an existing field value, or the AddNew method if
you want to add a new record into tblProjects. Again - *I don't know the
context*. I have no idea what this Form is doing, whether tblProjects is its
recordsource or totally unrelated... and my crystal ball is in the shop for
repairs! <g>

thanks for the effort, managed to acomplis this by creating an update
query based on the tblProjects where the field lives,
and used the following update to ""P:\QUOTATIONS\" & Forms!
frm_ProjectEdit.ProjectQNo & " - " & Forms!
frm_ProjectEdit.ProjectTitle" then i also had another field in the
query "ProjectQNo" with the Criteria as [Forms]![frm_ProjectEdit]!
[ProjectQNo] then attached the OpenQuery on the command button. and
seems to work.

so for any where which needs a similar process her you go!

Regards

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top