I have a main form (frm_Search) which contains two buttons (btnSearch and btnOpenRec) whose functions are to perform a keyword search and open form (frm_Sch1) to a selected record for editing, respectively. The keyword search button filters a subform (SubSearchForm) by Index&Facility (Short text, ie. 101A) and Reporting Year (Number, ie. 2017). Users are able to select the desired record in the subform and displays it in the txtIF and txtRY textboxes (linked by control source).
Here is my code.
DoCmd.OpenForm "frm_Sch1", acNormal, , "[Index&Facility=]'" & Me.txtIF & "'" And "[Reporting Year=]" & Me.txtRY, acFormEdit, acWindowNormal
I have tried every combination of quotes, looked into tables and made sure the fields are aligning correctly and are of the right type. Any suggestions would be greatly appreciated, I've been trying for the past two days with no luck.
Note: When I run the code and hover my cursor over Me.txtIF and Me.txtRY a tooltip displays Me.txtIF = "101A" and Me.txtRY = 2017, respectively.
This is my first time posting in the forum and I'm very new to access and not too sure as to how much information to include.
Not sure if this is supposed to be in the programming sub-forum but this issue seems like a quick fix.
THANK YOU!