Recently upgraded backend from Access 97 to SQL Server 2000 and using Access 97 frontend. Any reason why the following code for a combo box does not work with SQL Server backend. It works fine with Access 97 backend.
Sub Combo77_AfterUpdate()
Me.RecordsetClone.FindFirst "[JobID] = " & Me![Combo77]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Record Source for combo box:
SELECT DISTINCTROW qryJobs.JobID, qryJobs.JobDate, Customers.Name, qryJobs.SysREF
FROM (qryJobs INNER JOIN [Job Sales Charges] ON qryJobs.JobID = [Job Sales Charges].JobID) INNER JOIN Customers ON [Job Sales Charges].CustomerID = Customers.CustomerID
ORDER BY qryJobs.JobID DESC , qryJobs.JobDate DESC;
I have a tab control form ( 4 Tabs) – Main Form in first tab, subform in second tab, subform in third tab and subform in fourth tab. All subforms linked to Main Form by JobID on Link Child and Link Master. I can type the JobID into the combo box and scroll to find it. But once I hit the Enter key it gives me some other record. I usually have to scroll down the JobID before or after the actual JobID, come back to the JobID, hit the Enter key and then I get the record. A great inconvenience for the office staff. Any way of getting around this - maybe another way of coding. Any suggestion is appreciated.
Sub Combo77_AfterUpdate()
Me.RecordsetClone.FindFirst "[JobID] = " & Me![Combo77]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Record Source for combo box:
SELECT DISTINCTROW qryJobs.JobID, qryJobs.JobDate, Customers.Name, qryJobs.SysREF
FROM (qryJobs INNER JOIN [Job Sales Charges] ON qryJobs.JobID = [Job Sales Charges].JobID) INNER JOIN Customers ON [Job Sales Charges].CustomerID = Customers.CustomerID
ORDER BY qryJobs.JobID DESC , qryJobs.JobDate DESC;
I have a tab control form ( 4 Tabs) – Main Form in first tab, subform in second tab, subform in third tab and subform in fourth tab. All subforms linked to Main Form by JobID on Link Child and Link Master. I can type the JobID into the combo box and scroll to find it. But once I hit the Enter key it gives me some other record. I usually have to scroll down the JobID before or after the actual JobID, come back to the JobID, hit the Enter key and then I get the record. A great inconvenience for the office staff. Any way of getting around this - maybe another way of coding. Any suggestion is appreciated.