var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Creating a public connection
I have a few connections to the same back end. Is there a way of declaring the connection publicly so I can call the connection from the forms instead of creating it each time?
I'm not exactly sure if I understand you correctly, but however
You can put something like this in a module:
public myConn1 as adodb.connection
and then initialize myConn1 when first needed
public sub initConn()
set myConn1 = new adodb.connection
and on shutdown destroy myConn with the usual set myConn1 = nothing.
ahh.. I think that will do it.. Thank you!
One more question:
I have the following statement that opens a recordset:
For some reason, this is not working, as I figure I have my syntax wrong for the LIKE operator. If I remove the WHERE condition the SQL runs fine.
.Open "Select * from tblCaseUpdates WHERE description LIKE'" & "*" & mySearchStr & "*" & "'"", CurrentProject.Connection, adOpenKeyset, adLockOptimistic"
I always use the application's connection for ADO. forexample:
It also derrives user security and rights of the database.
Dim ADOCon As ADODB.Connection
Set ADOCon = Application.CurrentProject.Connection
Thanks, I will remember that.. Any ideas on the variable problem?
.Open "Select * from tblCaseUpdates WHERE description LIKE '" & "*" & mySearchStr & "*" & "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic