Lot's going on here, summary: Please excuse my ignorance....
Make table query concatenates three table fields to a new field. F1+F2+F2 = "F1F2F3" in a new field. I need to get that concatenated text string and pass it along as a parameter in an executable. I figure RecordSet is the correct method to get the text, and Shell to pass it on the the executable, but I'm way new to all this.
I've been trying with these statements without sucess:
Make table query concatenates three table fields to a new field. F1+F2+F2 = "F1F2F3" in a new field. I need to get that concatenated text string and pass it along as a parameter in an executable. I figure RecordSet is the correct method to get the text, and Shell to pass it on the the executable, but I'm way new to all this.
I've been trying with these statements without sucess:
Code:
Sub Test06()
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = CurrentProject.Connection
'Open the new table, goto last record, last field (hopefully)
rs.Open "SELECT * FROM Test", cn, adOpenStatic, adLockReadOnly
rs.MoveLast
'Ok, if we arrived, like Cntrl+End would do, How do we Cnrtl+C, Copy?
'Then pass the copied text string ("F1F2F3") as part of the shell command?
Shell("C:\PATH\PROGRAM.EXE /F1F2F3", 1 ) ' << The "F1F2F3" string goes behind the .exe
Set rs = Nothing
Set cn = Nothing
rs.Close
End Sub