This project is a firmware loader for a programmable speaker system.
It calls an Exe, and a /parameter using System data scanned by barcode on a form, the form runs Sub RunLoader01()
Now the Engineers want me to use a lookup table to get the executable(Ping) and the parameter string (systemid) so they can manage the firmware updates independently in a new table.
I'll need to use systemid (filename) as the lookup string, then retrieve two fields to replace "Ping.exe" and a New field called "Firmware" to replace the old "systemid" in my Shell command.
I was told dlookup was my only option, but if that's untrue I'm wide open to whatever else can work?
I need to bring those 2 fields, "executable" and "parameter", back to my Sub RunLoader01() and insert them where I currently have Ping.exe, and systemid.
This will launch the proper Executable, and load the correct Firmware into the speaker system.
Anyone have ideas how to bring two fields from another table using dlookup and Dim them into my new Shell command??
I’m already getting a field from one table using rs.MoveLast.
It calls an Exe, and a /parameter using System data scanned by barcode on a form, the form runs Sub RunLoader01()
Code:
Sub RunLoader01()
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = CurrentProject.Connection
rs.Open "SELECT * FROM SYSTEMSPRODUCED01", cn, adOpenStatic, adLockReadOnly
rs.MoveLast
Dim systemid As String
systemid = rs("FILENAME") 'last field named Filename
Shell ("Ping.exe ") & systemid, 1 'Use Ping.exe for testing
'Firmware rev as parameter
MsgBox "LOADING, " & systemid, vbOKOnly, "LOADING FIRMWARE MATCHED TO:" 'User msg confirms load
Set rs = Nothing
Set cn = Nothing
End Sub
Now the Engineers want me to use a lookup table to get the executable(Ping) and the parameter string (systemid) so they can manage the firmware updates independently in a new table.
I'll need to use systemid (filename) as the lookup string, then retrieve two fields to replace "Ping.exe" and a New field called "Firmware" to replace the old "systemid" in my Shell command.
I was told dlookup was my only option, but if that's untrue I'm wide open to whatever else can work?
I need to bring those 2 fields, "executable" and "parameter", back to my Sub RunLoader01() and insert them where I currently have Ping.exe, and systemid.
This will launch the proper Executable, and load the correct Firmware into the speaker system.
Anyone have ideas how to bring two fields from another table using dlookup and Dim them into my new Shell command??
I’m already getting a field from one table using rs.MoveLast.