Code:
Private Sub EmpID_Click()
Dim SQL As String
SQL = "SELECT * FROM Employee WHERE (((Employee.EmployeeID)=" & Me.EmpID & "));"
Me.Parent.sfEmp.Form.RecordSource = SQL
Me.Parent.tabPublisher = 1
End Sub
This was the code we had before Office 2007. The purpose of this code is to allow a user to click on a search result in tab 3 and have the tab change to tab 1 while also selecting the result "ID". (if that makes sense)
This code did work prior to our Office 2007 switch. Is there something in 2007 that would make this code not work? If Office 2007 is not the problem, does anyone know why this code doesn't work. I've checked all the names and everything is spelled right. The problem is: when you click the result, it DOES take you to Tab1, but it does not select the record you clicked on, it just brings you to a new blank entry. And also, when i try to navigate the form by using the foward and back arrows, it shows the database as being empty, when it really isn't. I assume this is the result of the form being filtered?
I'm sure you'll probably need more detailed information, just let me know what you need to know and i'll repost it.