Form Filter not working when adding fields from a crosstab query (1 Viewer)

cnew

New member
Local time
Today, 03:13
Joined
Jan 9, 2018
Messages
4
I have a form based on a select query that includes a search box. The box is tied to a button that filters the records based on what is typed into the text box, in this case name. This is working perfectly. However, I need to edit my query on which this form is based to include a field from a crosstab query. When I add the field everything works correctly on both the query and the form, but no matter what I try my search/filter macro stops working. Why is this happening and what can I do to fix it?

I'm an Access noob and self teaching; so please go easy on me. This is just the first snag in my database that I haven't been able to solve with a few googles or tutorial videos.

--Details in case they matter--

Form name: Student Info Home

Filter macro that I'm using for my search filed: [Last] Like "*" & [Forms]![Student Info Home]![Search] & "*" Or [First] Like "*" & [Forms]![Student Info Home]![Search] & "*"

Error I'm receiving: "The Microsoft Access database engine does not recognize '[Forms]![Student Info Home]![Search]' as a valid field name or expression"

Again this macro is working fine until I add the field to my base query from a crosstab query. I can add any other fields from other select queries.
 

cnew

New member
Local time
Today, 03:13
Joined
Jan 9, 2018
Messages
4
Yes. Thank you!! That was exactly my problem. I actually stumbled across that article yesterday, but didn't realize that I had to define parameters for all related queries too. Everything is working smoothly now.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:13
Joined
Aug 30, 2003
Messages
36,118
Happy to help and welcome to AWF by the way!
 

Users who are viewing this thread

Top Bottom