Code:Private Sub cboPatientSelection_AfterUpdate() Dim rs As DAO.Recordset If Not IsNull(Me.cboPatientSelection) Then 'Save before move. If Me.Dirty Then Me.Dirty = False End If 'Search in the clone set. Set rs = Me.RecordsetClone [COLOR="Red"]rs.FindFirst "[VolpID] =""" & Me.cboPatientSelection & """"[/COLOR] If rs.NoMatch Then MsgBox "Not found: filtered?" Else 'Display the found record in the form. Me.Bookmark = rs.Bookmark End If Set rs = Nothing End If End Sub
So basically, I have a form that used a specific SQL source for the form, and I had to remove a query that I was using because it had become obsolete (in retrospect I didn't necessarily have to remove it). But after the combobox stopped being able to load patient chart information and started providing error messages when I try to select a patient
The problem is the above code has stopped working for the field VolpID, and the unbound comboxbox I'm using is broken on this form. I've tried using the code above in different places and it has been hit or miss on whether it works.
On this particular form I have Data Entry set to Yes. The fetch default is set to yes. For the unbound combobox, is limited to list and does allow value lists.
In the background the table is based of tblpatient left joined with tblinsurance, with two queries as well tagging along to provide calculated fields.
Been working at fixing this for a few days. Any help would be much appreciated to better understand how this code( from allen browne) interacts with my form settings, etc.