Openpop Where Clause problematic, complains of invalid field name


I am having trouble using OpenPopup UI command in an Access 2013 Web App. The where clause is creating an error saying Invalid field name. The field name is valid. It worked initially but it seems that after I made changes to the underlying table or form  then this error pops up.

Any ideas?

I have attached screen shots.
james saulezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
Not sure...
Things to try:

Rename your objects to not include spaces or underscores:
Key Activities (table)-->KeyActivities
Key_Activity_ID (field)-->KeyActivityID

Also note that it may be the textbox that is throwing the error.
So try renaming that textbox to something a bit more standard like: txtKeyActivityID

It worked initially but it seems that after I made changes to the underlying table or form  then this error pops up
...Check your spelling carefully for all of the changes you made.

Finally, ..make sure that the textbox has a valid ID in it when you run this code.

james saulezAuthor Commented:
Hi Jeff

Ok so I found the problem..although I would consider it a bug! The no spaces and special fields did not help.

If you modify the list view that the popup command is opening, it causes a problem. I added a field onto the list view from a related tables. As soon as you do that, it changes the data source to an embedded query... See attached document for this.

The openpop then breaks...

It is described in Jeff Conrads book on page 584 Access 2013 inside out. There is a workaround. You need to create a saved a query. The system generated query cannot be accessed by the where clause.

2 days of pain !!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
OK great, ...
You can now accept your own post as the solution.
james saulezAuthor Commented:
I found the known issue in book by Jeff Conrad on Access 2013.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.