I have query that I need to convert to VBA RunSQL syntax
The status references a form control, and the ID references a form control too. The ID itself is a combination of a form control and something else, which I define in a string array.UPDATE StatusT SET StatusT.Status = [Forms]![Main]![Control1]
WHERE (((StatusT.ID1)=[Forms]![Main]![Control2] & "." & StrOE(i)));
That is, the ID takes the form of
A1.Ohio
A2.Minnesota
So, I would just define StrOE = Array (Arkansas, Nebraska, ... etc) and just call on it in a for loop
I have no idea how to write this in the syntax required for a RunSQL command.
Any help is appreciated.
Thanks,
PS -
This is what I have that's giving me syntax errors
DoCmd.RunSQL ("UPDATE StatusT SET StatusT.Status = [Forms]![MainNavigation]![NavigationSubform].[Form]![EditMetric].[Form]![EMMetric] WHERE (((StatusT.ID1 = [Forms]![MainNavigation]![NavigationSubform].[Form]![EditMetric].[Form]![EMMetricID]" & "." & StrOE(i) & "));")