Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting some info to show

Status
Not open for further replies.

K3ith

Technical User
Oct 26, 2001
16
0
0
US
Can someone help please,

What I would like to achieve is for the result from the following code to be placed in a text box:

MkDir "e:\car\" & Me![car_reg].Value & " - " & Me! _[car_make].Value

The above code makes a directory, and I would like is for the directory path to be shown in a text box. I thought this would I have been easy to do, by assigning a variable such as:

Dim folder as string

Folder = MkDir "C:\misc\" & Me![Project_ID].Value & " - " & Me![Short_Title].Value

But it seems to have a problem with the MkDir command.

So my goal is for the directory to be created and the path of the newly created directory to be shown in a text box.

All help is greatly appreciated.

Thanks.
 
Separate the two bits......MkDir is a statement, not a function so it doesn't return a value so you need to make and then pass the same parameters to your string.

So......

Dim folder as string

MkDir "C:\misc\" & Me![Project_ID].Value & " - " & Me![Short_Title].Value

Folder = "C:\misc\" & Me![Project_ID].Value & " - " & Me![Short_Title].Value

.....will work!!!

HTH

Craig
 
Thanks, that solved my problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top