
Originally Posted by
June7
What would you like to type in the combobox - patient lastname, firstname? Change the Row Source to:
SELECT Observations.ObsID, [Patients].[LastName] & ", " & [Patients].[FirstName] & " | " & [Studies].[StudyID] & " | " & [Observations].[Period] AS Expr1, Studies.StudyID, Observations.Period
FROM (Patients INNER JOIN Studies ON Patients.PatientID = Studies.PatID) INNER JOIN Observations ON Studies.StudyID = Observations.StudyID
ORDER BY Patients.LastName, Studies.StudyID;
Now can type patient lastname, firstname and the combobox will auto fill.
Something I forgot to include. In the combobox GotFocus event add this line: Me.cbxObs.Dropdown
Now the list will automatically show when box gets focus and can use up/down cursor keys.
Can also move the combobox and button into the Detail section and set the combobox TabIndex to 0 so it will have focus when the form opens.