var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Object variable not set.
Following up on a previous thread (which was solved by running RegSvr32 on a couple of DLL files)...
This code worked under Access 2003, but now I'm getting an Object variable or With block variable not set error on the rsEnv.Open line.
Public Sub SetEnvironmentLabel()
Dim strSQL As String
Dim rsEnv As ADODB.Recordset
strSQL = "SELECT E.Name, TC.TestCaseName " & _
"FROM Environment E, TestCase TC " & _
"WHERE TC.EnvironmentID = E.EnvironmentID " & _
"AND TC.TestCaseID = " & Me.cboTestCaseName.Value
rsEnv.Open strSQL, CurrentProject.Connection
Me.lblCurrentEnvironment.Caption = "Environment: " & rsEnv!Name
Set rsEnv = Nothing
End Sub ' SetEnvironmentLabel
rsEnv = Nothing at that point, because the command hasn't executed yet. Since this code ran under 2003, can somebody tell me what's missing under 2007?
If you add "new" to the line it should work:
Dim rsEnv As New ADODB.Recordset
Yes, I caught that myself just after I posted the original message. My apologies for wasting your time.
No problem. Maybe this thread will someone in the future as well.