I am facing a unique problem with Recordset, struggling to resolve since a couple of days and requesting assistance, please.
Dim Rs as DAO.Recordset
Dim db as DAO.Database
Dim Path_ as String
Path= “C:\Test.accdb”
Set db = OpenDatabase(Path_, False, False)
Sql = “Select * From tbl_Users”
Set Rs = db.OpenRecordset(Sql)
Set Me.Recordset = Rs
txtTextBox.SetFocus
Record displays but the cursor is lost, except CTRL + TAB no other key on keyboard works unless anywhere on the form mouse is clicked. This is strange this only happens when Set Me.Recordset = Rs is applied. Tried on multiple PC with the same result.
Alternative below work
Sql = “Select * From [“ & Path_ & “].tbl_Users”
Me.Recordsource = Sql
Me.Requery
txtTextBox.SetFocus
This works perfect and not facing any issues.