I have this SQL statement which is contained in a loop.
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index] = 1 WHERE (((Top1.Index)<> Horse ));"
Is there a way to obtain the value Horse and use in a an if then else statement
Pseudo:
if (SELECT table1.FIELD1 FROM table1 WHERE (((table1.FIELD1)="Horse")); is true Then
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index]=1"
Else
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index]=1"
End If
"My God! It's full of stars...
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index] = 1 WHERE (((Top1.Index)<> Horse ));"
Is there a way to obtain the value Horse and use in a an if then else statement
Pseudo:
if (SELECT table1.FIELD1 FROM table1 WHERE (((table1.FIELD1)="Horse")); is true Then
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index]=1"
Else
DoCmd.RunSQL "UPDATE Top1 SET Top1.[Index]=1"
End If
"My God! It's full of stars...