Solved FAYT and error 3071 (1 Viewer)

ClaraBarton

Registered User.
Local time
Yesterday, 23:17
Joined
Oct 14, 2019
Messages
469
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?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:17
Joined
May 21, 2018
Messages
8,536
If the query is not stored, I would try storing the query.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:17
Joined
May 21, 2018
Messages
8,536
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.
 

ClaraBarton

Registered User.
Local time
Yesterday, 23:17
Joined
Oct 14, 2019
Messages
469
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

  • Music.accdb
    1.3 MB · Views: 84

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:17
Joined
May 21, 2018
Messages
8,536
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

  • Music.accdb
    2.1 MB · Views: 90

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:17
Joined
May 21, 2018
Messages
8,536
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

  • Music_2.accdb
    1.6 MB · Views: 122

ClaraBarton

Registered User.
Local time
Yesterday, 23:17
Joined
Oct 14, 2019
Messages
469
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

Top Bottom