I have a table called IDD185. This table has a field called MESSAGE. The MESSAGE field has a message that includes specific information. I have another field called GENERIC MESSAGE. I want to update GENERIC MESSAGE field with the MESSAGE value excluding the specific information. This GENERIC MESSAGE field can then be used to report and pivot on different types of messages.
ex.
The Message field would have:
IDD185 - Import Shipment Sales Order 0007752519 Successfully Created
0007752519 is the specific information.
Right now it is working by creating a query with wild cards for each type of message that identifies all records with like messages and then updates the GENERIC MESSAGE with just the generic information:
BEGIN QUERY
UPDATE IDD185 SET IDD185.GenericMessage = "IDD185 - Import Shipment Sales Order Successfully Created"
WHERE (((IDD185.GenericMessage) Is Null) AND ((IDD185.Status)=53) AND ((IDD185.Message) Like "*" & "Successfully Created"));
END QUERY
Rather then create a query for each one, I would like to house this information in a table and have some vb code loop thru the table, finding each record that matches the criteria and update the GENERIC MESSAGE field.
For below message:
IDD185 - Import Shipment Sales Order 0007752519 Successfully Created
The Table Messages entry would be:
MessageIdentifier
Like "*" & "Successfully Created"
Generic Message
IDD185 Import Shipment Sales Order Successfully Created
I am not great with loop code, please get me started.
ex.
The Message field would have:
IDD185 - Import Shipment Sales Order 0007752519 Successfully Created
0007752519 is the specific information.
Right now it is working by creating a query with wild cards for each type of message that identifies all records with like messages and then updates the GENERIC MESSAGE with just the generic information:
BEGIN QUERY
UPDATE IDD185 SET IDD185.GenericMessage = "IDD185 - Import Shipment Sales Order Successfully Created"
WHERE (((IDD185.GenericMessage) Is Null) AND ((IDD185.Status)=53) AND ((IDD185.Message) Like "*" & "Successfully Created"));
END QUERY
Rather then create a query for each one, I would like to house this information in a table and have some vb code loop thru the table, finding each record that matches the criteria and update the GENERIC MESSAGE field.
For below message:
IDD185 - Import Shipment Sales Order 0007752519 Successfully Created
The Table Messages entry would be:
MessageIdentifier
Like "*" & "Successfully Created"
Generic Message
IDD185 Import Shipment Sales Order Successfully Created
I am not great with loop code, please get me started.