Hi there, I am trying to open a report based on a query that is basing it's criteria on a form field. I do this all the time and for some reason I am having trouble. The field in the query is called [afnumber] from the adoptive family table. In the criteria I have put
Forms![Adopting Family - Update Form]![Adoptive Family.afnumber]
The reason I have put Adoptive family.afnumber is because the form has more than one afnumber field. In addition I used the build button to make sure my syntax was correct. I am thinking that the spaces in the name is what is messing me up. I didn't build the database so I can't just change the names of fields.
Here is the error I get when I try to run this query. "Invalid bracketing of names..." If I take out the table name from the field name it runs the query but gives no results. If I put brackets around each of the table name and the field name it prompts me for a parameter value not recognizing the form name.
I have checked and double checked spelling, spaces etc. I have even created a button on the form that pops up a message box with the afnumber in it to see if it would recognize the syntax in VBA and it was fine.
Please help.
Thanks
Dawn
Forms![Adopting Family - Update Form]![Adoptive Family.afnumber]
The reason I have put Adoptive family.afnumber is because the form has more than one afnumber field. In addition I used the build button to make sure my syntax was correct. I am thinking that the spaces in the name is what is messing me up. I didn't build the database so I can't just change the names of fields.
Here is the error I get when I try to run this query. "Invalid bracketing of names..." If I take out the table name from the field name it runs the query but gives no results. If I put brackets around each of the table name and the field name it prompts me for a parameter value not recognizing the form name.
I have checked and double checked spelling, spaces etc. I have even created a button on the form that pops up a message box with the afnumber in it to see if it would recognize the syntax in VBA and it was fine.
Please help.
Thanks
Dawn