Code:
Private Sub Test_Click()

  Dim RetVal As Long
  On Error Resume Next
  
  Dim stDocName As String
  Dim stLinkCriteria As String
  Dim tPath As String

    stDocName = "ImageToolPath form"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
     
    tPath = Path1
  DoCmd.Close  
  
  RetVal = ShellExecute(0, "open", tPath & "\ImageTool.exe", "", "", 1)

End Sub
Hi all, upon clicking Test_Click(), another form "ImageToolPath form" will be opened. This form has a textbox by the name of Path1 whose recordsource is set to a particular table. I want to obtain the text in Path1 by using the statement in red so tat i can use it to launch my exe file in shellExecute.

However, the value of tPath is always NULL.. can anyone help me pls...?? thks

FT