I have (inherited) an access database which uploads NEW records to a MYSQL database on an event (button click). However I wish to update a part of an EXISTING record on a UPDATE button and need help with same. Here is what I have\where I am heading with code...
1. I want to save the key user details record within access when I make the record change. Therefore I have an event that executes DoCmd.RunCommand acCmdSaveRecord
when the SAVE button is clicked
2. However I need to add code to the procedure that will write a part of the record that has been saved\updated e.g. an updated email address, to the correct record\field on the key user table in my mysql db(Joomla).
NOTE: The Joomla db does not have matching tables so I am looking to query the Joomla table for the same user record (identified by a common participant ID value ) and change the email element\field to the new one.
The database connection opens up fine and I use the following code to execute a query that will isolate the MYSQL record in Joomla. Where to next though?
In pseudocode terms I want to know how to refer to the access email field of the current selected record and write its value over the email field of the MYSQL record whcih has the same participant number .
strSQL2 = "jos_enrolusers"
strSQL3 = "Select distinct from jos_enrolusers where jos_enrolusers.email=?"
Set qdf = New ADODB.Command
qdf.CommandText = strSQL3
qdf.CommandType = adCmdText
qdf.Prepared = True
Set prmEmail = qdf.CreateParameter("EnterEmail", adChar, adParamInput, 50)