Solved my own problem :-)
I moved the code to the Format event. Now each image is created in the Format event instead of creating all at once in the OnOpen event.
The client has a report based on a query which uses parameter values. In my report I execute code in the onopen event. OnOpen executes before the user can enter the value for the parameter. Anyway around this?? Can I get hold of the parameter value that the user enters?
...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...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_globals_50u1.asp
From MS:
The scope of the @@IDENTITY function is the local server on which it is executed. This function cannot be applied to remote or linked servers. To obtain an identity value on a different server...
You can't use @@identity on an update, it's just for insert or select into. And I think if I'm not wrong you have to put the @@identity right after the insert.
Thanks for the star! Yes I agree the solution needed the final touch, thanks. Sorry forgot to close the connection, I'll use your updated code when I install it next week.
Whenever I've posted my question on different forums people say, put the images on the network and link with a path stored...
...Dim rs As DAO.Recordset
Dim strSql As String
strRecSource = Me.RecordSource
Set db = CurrentDb
strSql = "SELECT * FROM " & strRecSource
Set rs = db.OpenRecordset(strSql)
Do While Not rs.EOF
CreateImageOnDisk rs("id"), rs("file_name")
rs.MoveNext...
I think we can forget my problem anyway. In my query which combines access tables and sql server linked tables I get an image field from the sql server.
I want to use ado's stream object to save the image to disc and then show it in a report. I guess I have to do it in two steps. First opening...
Ok. Going straight against the sql server with ado is no problem.
I want to go against the Access database with the linked sql server tables so I don't have to enter userid and pwd for sql server and I want to combine both access tables and linked tables in a query. It might not work that way?
In my access database I have both regular Access tables and linked Sql tables. I try to use ado and do a simple select * from table on a linked table and I get an error that I'm missing parameters? I can double click on the linked tables and get the result. Anyone knows what's wrong?
My...
Here it is:
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\data\app.mdb;" & _
"User Id=;" & _
"Password=
Hi!
I have a couple of tables stored in a sql server. One of those tables holds images in binary format. I also have Access tables and link the sql server tables into my Access database.
If I go straight against the sql server and use Ado stream object to convert the binary to images it works...
Thanks for the help! I rewrote the stored proc to go straight against the tables and it boosted the performance quite a bit.
I'd love more than anything else to have just one stored proc that gave me the result but the report is quite complicated with lots of data. On each vehicle the customer...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.