Can anyone tell me why the select query doesn't pop up? I get the msgbox, so I know the code is running, but the recordset.open command produces nothing. What's wrong? Here's my code:
Private Sub Search_Click()
' Set up ADO Recordset and Connection
' ================================================
Dim myConnection As ADODB.Connection
Set myConnection = CurrentProject.Connection
Dim myRecordset As New ADODB.Recordset
myRecordset.ActiveConnection = myConnection
' ================================================
'
Dim strOps, strEvent, strArea As Integer
Dim mySQL As String
mySQL = "SELECT ReliabilityEvents.IncidentID, ReliabilityEvents.Operation, ReliabilityEvents.TypeofEvent, ReliabilityEvents.Area FROM ReliabilityEvents;"
myRecordset.Open mySQL, , adOpenStatic, adLockOptimistic
MsgBox mySQL
End Sub