compile error in query expression

I had this question after viewing How to show a web linked image on a report.

In the trial database I have got the following errors:


Screen-Shot-2017-08-13-at-09.39.29.png
and

Screen-Shot-2017-08-13-at-09.39.21.png
can you help?
João serras-pereiraAsked:
Who is Participating?
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.

als315Commented:
I have no problems with Gustav's sample. It is call of function. May be you have not allowed module execution? What Access version is used?
Can you open record source of this form? Can you run this query?
0
João serras-pereiraAuthor Commented:
access 2016
0
João serras-pereiraAuthor Commented:
when I try to run the form it crashes....
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

als315Commented:
Please, open module and compile it
0
Gustav BrockCIOCommented:
All the green corners indicate missing fields, so it looks like you have deleted the Flags table.

/gustav
0
Gustav BrockCIOCommented:
If (as) you use Access 64-bit, the API declaration must use PtrSafe. It can be done like this:

#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
    ByVal pCaller As Long, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As Long) _
    As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
    ByVal pCaller As Long, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As Long) _
    As Long
#End If

Open in new window


I will later adjust the code in the article the question refers to.

/gustav
0

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
João serras-pereiraAuthor Commented:
Perfect!!!!! IT IS WORKING!!!!! thanks a lot!!!
joao
0
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
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
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.