I have a "frmPatients" that has a combobox linked to tblPatients. After-Update the form displays info on the patients. I want to create a listbox on "frmPatients" to display the tblVisit information. tblVisit has VisitID, PatientID...etc. I can get this to work if I use a subform, but I would like to know if a listbox can work as well.
I am trying to query a listbox as follows;
SELECT tblVisit.VisitID, tblVisit.PatientID, tblVisit.DOI, tblVisit.DiagID, tblVisit.ClaimNum, tblVisit.ContactID, tblVisit.OpenClose
All I get is a BLANK listbox. if I delete the WHERE statement the listbox list all visits.
If I use this code in a SubForm is works just fine.
I placed the code iin the Change() event, now when the combobox changes, the list box displays the code: "SELECT tblVisit.VisitID, " & .............WHERE (((tblVisit.PatientID)=" & Forms!frmPatients!patientID & "));"