Author |
Topic |
weedavie22
Starting Member
24 Posts |
Posted - 2004-01-08 : 11:39:46
|
Hi,I wonder if any of guys can help me, I'm trying to create a database that has the ability to link an individual external directory to every record within the database every time a new record is created.e.g record 111 would have a corresponding folder 111 that contained the relevant correspondence to that client that I could open via the form.Is this possible or is there something similar anyone can suggest?Any help would be greatly appreciated |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2004-01-09 : 01:35:02
|
I'm not really sure what you mean...why not just record the folder name against each record..alter table records add linkedfolder varchar(500) etcWhat exactly do you mean by "linked" anyway - could you explain more of what you're actually trying to do. What's going into the folder? What's in the record? What's the application?--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
weedavie22
Starting Member
24 Posts |
Posted - 2004-01-16 : 11:13:57
|
Really what I want is to create a folder for every new record thats inputed into my database so that any spreadsheets and word docs can be stored and found from that particular record.For example: I create record with unique ref G1000 with client name Bill Smith.automatically afterwards I want a folder in C:\database\G1000\ so that I can store XLS and Docs and access them via a button on that records form.Hopefully this makes more sense.Dave. |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-01-16 : 11:38:14
|
if your app has a form in which the user is creating new records, after the record is updated or created, just use the MKDIR() command in VB to create a folder. Just concatenate your starting point (i.e., "c:\database\") with the recordID or whatever it is you want to call the folder, and pass it as an argument to MKDIR.- Jeff |
 |
|
weedavie22
Starting Member
24 Posts |
Posted - 2004-01-18 : 16:50:27
|
This is the command for my button: MkDir "C:\test\forms![tblNEWAPPEAL]![file_ref]"All this does is calls my folder "forms![tblNEWAPPEAL]![file_ref]"I'm sorry I’m a bit of a newbie at this stuff; what I want is a button on the current form that creates a folder that has the file_ref (e.g. G1000) that’s on the current record.Any help with this would be really appreciated,Cheers Dave |
 |
|
weedavie22
Starting Member
24 Posts |
Posted - 2004-01-18 : 17:13:11
|
I figured it out,Cheers for all your help |
 |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2004-01-18 : 17:14:08
|
Watch where you put your quotes...trymkdir "C:\test\" & forms@[tblNewAppeal]![file_ref]It's a pretty dodgy way to do it for my money - but the quotes are your problem....--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2004-01-18 : 17:16:43
|
Watch out too, that the names are unique, not too long, and valid for the dos. If I were you I'd write a function which turns any user entered folder name into a valid folder name, and also checks that no such folder already exists, giving it a numeric extension if a identical folder name already exists.cheers--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
weedavie22
Starting Member
24 Posts |
Posted - 2004-01-19 : 07:10:22
|
Hi,I've used this command to save the folder:MkDir "C:\test\" & [Fileref] & [propclient] & "\"= C:\test\1000davesmithNow I want to open the folder and i've used this command:Shell ("explorer c:\test" & "\" & [Fileref] & [propclient] & "\")For some reason it only opens minimised on the taskbar and not maximized.Any ideas??Cheers Dave |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-01-19 : 12:14:51
|
read in help about the shell command. the second argument allows you to specify the type of window to execute the program you are calling in.- Jeff |
 |
|
|