Dim pathElements As String()
Dim path As String
path = "Z:/Contracts/THISFOLDERHERE/05 Mail/05-08-2008/Application.exe"
pathElements = Split(path, "/")
label.Text = pathElements(pathElements.Length - 4)
Yep, just use App.Path so it becomes...The path won't be static, is there any way of changing "path = ..." to the applications path?
pathElements = Split(App.Path, "\")
pathElements = Split(App.path, "\")
Label_date.Caption = pathElements(pathElements.length - 4)
WHSYou might want to check that pathElements.length is > 4 before you try to take 4 away from it.
myRecSet.Open "mail_info", MyConnObj, adOpenKeyset
myRecSet.AddNew
myRecSet.Fields("name").Value = MyName
myRecSet.Fields("mail_date").Value = MyDateFolder
myRecSet.Fields("contract").Value = MyContract
myRecSet.Fields("read_date").Value = MyToday
myRecSet.Update
MyConnObj.Close