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.
June... the innerjoin did not really help... I don't know.
I am sothat my database is still not working properly. This is the only part that is not functioning right.
![]()
Thank you so much for all your help tho! I really appreciate it!
What do you mean by 'not working right'? It was working for me in the sample.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I have a feeling is something to do with my SEARCH FORM.. I have filtering it/ selecting patient based on StudyID but because my subforms have another ID to do.. I will try later with SELECTING PATIENT based on TWO ID.. maybe searchcriteria
Do you want to provide your db for analysis?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Best thing is to attach to thread. Copy database, remove confidential data, run Compact & Repair, zip if large, attach to post. The Attachment Manager is below the Advanced post editor.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks June.
I have attached a copy of the database here.
I have removed all the other forms that is not needed.
so if you see... The edit does not correspond to what I have searched for.
Though the patient information matches. The AM, PM, LUNCH does not match
This is not replicating the example I provided you. Very much the same issue you started with. The audit form opens with main form filtered to the StudyID. The subform synchronizes with the StudyID. All related Audit records are retrieved. Activate the Navigation bar on the subform and you can view all of them.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
This is not replicating the example I provided you. Very much the same issue you started with. The audit form opens with main form filtered to the StudyID. The subform synchronizes with the StudyID. All related Audit records are retrieved. Activate the Navigation bar on the subform and you can view all of them.
because when I used InnerJoin example that you have provided did not give me the results that I want. Therefore, I went back trying to figure out if there is a way to fix the issue I started with![]()
Here's what I accomplished with your project. Added these lines to Open event of EditfrmAuditAddNewMain.
Me.AuditToolNew.Form.FilterOn = False
Me.AuditToolNew.Form.Filter = "AuditID=" & Form_fdlgSearchPatient.sfrSearchStudy.Form!AuditID
Me.AuditToolNew.Form.FilterOn = True
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Here's what I accomplished with your project. Added these lines to Open event of EditfrmAuditAddNewMain.
Me.AuditToolNew.Form.FilterOn = False
Me.AuditToolNew.Form.Filter = "AuditID=" & Form_fdlgSearchPatient.sfrSearchStudy.Form!AuditID
Me.AuditToolNew.Form.FilterOn = True
Thank you so much, June!!!
It finally solved my problem!![]()
Glad it works, just wish I had seen it much earlier. Not like I haven't done something similar to this, just didn't connect here right away.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.