I very new on Access scripting and I wanted to add on my event like load report and odbc connection so I can execute sql query besides the query attach on the said report.
thanks
thanks
Dim strSQL as String strSQL = "SELECT [field1], [field2], ... , [fieldn] " strSQL = strSQL & " FROM [linked table] INNER JOIN [another table] " strSQL = strSQL & " ON [linked table].[some field] = [another table].[some field];" Me.Recordsource = strSQL
IF somecondition THEN Me.Recordsource = "[Query1]" else Me.Recordsource = "[Query2]" end if
Comment