Hi there
I'm trying to set a form value equal to the result of an sql query. I know the query works, when I run it alone, it returns the correct result. Basically this is how I'm doing it:
Me.OpenRep = DoCmd.RunSQL("query")
but I get the error function or variable expected at the top line of the on_load event (where this is all happening). Any help is greatly appreciated.
I'm trying to set a form value equal to the result of an sql query. I know the query works, when I run it alone, it returns the correct result. Basically this is how I'm doing it:
Me.OpenRep = DoCmd.RunSQL("query")
but I get the error function or variable expected at the top line of the on_load event (where this is all happening). Any help is greatly appreciated.