I'm helping my client to adjust their report in Access 2000 so it can show images stored in a sql server.
Everything worked fine until I noticed that the query the report is based on takes parameter values. What happens is that my code in OnOpen event executes before the user has entered the value in the parameter form!
I have code that looks like this:
strRecSource = Me.RecordSource
Set db = CurrentDb
strSql = "SELECT * FROM " & strRecSource & " WHERE
file_type = 'jpg'"
Set rs = db.OpenRecordset(strSql)
The problem is that the Recordsource of the form is not set until the user enter the parameter value for the query!
Anyway around this?
Everything worked fine until I noticed that the query the report is based on takes parameter values. What happens is that my code in OnOpen event executes before the user has entered the value in the parameter form!
I have code that looks like this:
strRecSource = Me.RecordSource
Set db = CurrentDb
strSql = "SELECT * FROM " & strRecSource & " WHERE
file_type = 'jpg'"
Set rs = db.OpenRecordset(strSql)
The problem is that the Recordsource of the form is not set until the user enter the parameter value for the query!
Anyway around this?