set text path and focus (1 Viewer)

CuriousGeorge

Registered User.
Local time
Today, 12:48
Joined
Feb 18, 2011
Messages
131
Hello,

Im having some trouble figuring out how to solve following:

I want to be able to set a search path for my external program which uses the shell function. And similarly also a path from where my browse procedure should start from.

I have written the following in the after update event of the textpath:

Code:
Private Sub TextPath_AfterUpdate()
Me.TextDateOne.SetFocus
Me.TextPath.SetFocus
s = Me.TextPath.Text
Shell ("C:\Users\Database\Readlog_update\readlog.exe " & s & "\*.*")
End Sub

Ive been doing some searching and it seems as if i have to set focus to another text box before doing it to the one in question.

Still when trying to execute this code the compiler says that i have to set focus in order to get it to work.

How do i get my text path to work??

Cheers
 

JANR

Registered User.
Local time
Today, 12:48
Joined
Jan 21, 2009
Messages
1,623
Why use .text property at all???? It has limited use. Use the default .Value property.

Code:
Private Sub TextPath_AfterUpdate()
Shell ("C:\Users\Database\Readlog_update\readlog.exe " & [B][COLOR=red]Me.TextPath[/COLOR][/B] & "\*.*")
End Sub

JR
 

CuriousGeorge

Registered User.
Local time
Today, 12:48
Joined
Feb 18, 2011
Messages
131
Cheers mate
 

Users who are viewing this thread

Top Bottom