The following is the code I am using to populate data to a form. I get an error saying that there is not current record. The global variable 'gstrLocation' does have a value at run-time. Does anyone know what my problem is?

Private Sub Form_Load()

Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset

'Open an ADO Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\Issues_files\issues.mdb;"

'Open the ADO Recordset
rst.Open "Select * from tblLog WHERE location = '" & gstrLocation & " ' ", cnn

txtDateOccured = rst("dateoccured")
txtTimeOccured = rst("timeoccured")
txtDateReported = rst("datereported")
txtReportedBy = rst("reportedby")
txtLocation = rst("location")
txtCubeNumber = rst("cubenumber")
txtEnteredBy = rst("enteredby")
txtIssueNumber = rst("issuenumber")
txtCategory = rst("category")
txtPriority = rst("priority")
txtDownTime = rst("downtime")
txtIssue = rst("issue")
txtStatus = rst("Status")


'End If


End Sub


smh