I want to pass the text from an unbound text field to a program that access runs when a button is pushed. I've attached the code that calls the program. I've tried using the send keys but the program takes a few seconds to start and I don't know if I need to pause. I've seen this done, but haven't been able to figure it out.
Thanks for your help.
Dim Msg2, Style2, Title2, Help2, Ctxt2, Response2, MyString2 'Ask for label 2
Msg2 = "Do you want to print Content label ?" & Chr(13) & "Load " & Forms![labelmain]![Unimark].Form![Content Size] & " Labels" ' Define message.
Style2 = vbYesNo + vbQuestion + vbDefaultButton1 ' Define buttons.
Title2 = "Content label" ' Define title.
Help2 = "DEMO.HLP" ' Define Help file.
Ctxt2 = 1000 ' Define topic
' context.
' Display message.
Response2 = MsgBox(Msg2, Style2, Title2, Help2, Ctxt2)
If Response2 = vbYes Then ' User chose Yes.
MyString2 = "Yes" ' Perform shell command 2
Dim vall2 As String 'entire shell command 2
Dim y As Variant
vall2 = """C:\program files\Lmw32\lmwprint.exe"" /L=f:\labels\" & Forms![labelmain]![Unimark].Form![content label file name]
y = Shell(vall2, vbMaximizedFocus)
Thanks for your help.
Dim Msg2, Style2, Title2, Help2, Ctxt2, Response2, MyString2 'Ask for label 2
Msg2 = "Do you want to print Content label ?" & Chr(13) & "Load " & Forms![labelmain]![Unimark].Form![Content Size] & " Labels" ' Define message.
Style2 = vbYesNo + vbQuestion + vbDefaultButton1 ' Define buttons.
Title2 = "Content label" ' Define title.
Help2 = "DEMO.HLP" ' Define Help file.
Ctxt2 = 1000 ' Define topic
' context.
' Display message.
Response2 = MsgBox(Msg2, Style2, Title2, Help2, Ctxt2)
If Response2 = vbYes Then ' User chose Yes.
MyString2 = "Yes" ' Perform shell command 2
Dim vall2 As String 'entire shell command 2
Dim y As Variant
vall2 = """C:\program files\Lmw32\lmwprint.exe"" /L=f:\labels\" & Forms![labelmain]![Unimark].Form![content label file name]
y = Shell(vall2, vbMaximizedFocus)