Solved FAYT and error 3071

ClaraBarton

Registered User.
Local time
Today, 11:55
Joined
Oct 14, 2019
Messages
738
I use MajP's FAYT on my combos but I've run into a bit of a problem. I have a continuous form combo that throws a 3071 error when I add FAYT to it. It says the expression is too complicated. The combo works fine without the FAYT class.
Code:
Info: [tblSongs].[Title] & IIf(IsNull([Lyrics]),"","/" & [tblSongs].[Lyrics]) & "    " & Format([tblFolder].[Created],"Short Date") & "  " & [tblFolder].[Folder] & "  " & [tblSongDetail].[UserDetail] & " " & [tblFolder].[Notes]
Is there something here I could fix to make it work?
 
If the query is not stored, I would try storing the query.
 
I would have to see an example in order to try to debug, since the error is not directed at the FAYT code but generic to the query.
 
The sub form on the right is the one not working. The FAYT works until I add
& " " & [tblFolder].[Notes]
at the end of the INFO field in qryInfoCbo.
 

Attachments

This is likely a limitation of DAO and would require rewriting the code to do the filter differently. Here is a potential solution. I built a table "tblInfoCbo" to store the IDs and the Info. Kind of like a temp table. When the form opens it does an append query to add any new songs to the table and deletes songs from the cbo not in the song list anymore.
 

Attachments

I redid the class to fix the original problem. This class is more efficient I would think, but possibly not as flexible for different types of queries. The new class is "FindasYouTypeCombo2". The methods are the same, the inner working is different.
 

Attachments

Wow! You went above and beyond. I especially like plugging your class in with very little modifying on my part. I had used it on several projects and then ran into a little glitch that I assumed was my fault. Thank you so much!
 

Users who are viewing this thread

Back
Top Bottom