?
Solved

compile error in query expression

Posted on 2017-08-13
8
Medium Priority
?
29 Views
Last Modified: 2017-08-14
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?
0
Comment
Question by:João serras-pereira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 40

Expert Comment

by:als315
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
 

Author Comment

by:João serras-pereira
access 2016
0
 

Author Comment

by:João serras-pereira
when I try to run the form it crashes....
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 40

Expert Comment

by:als315
Please, open module and compile it
0
 
LVL 51

Expert Comment

by:Gustav Brock
All the green corners indicate missing fields, so it looks like you have deleted the Flags table.

/gustav
0
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 2000 total points
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
 

Author Closing Comment

by:João serras-pereira
Perfect!!!!! IT IS WORKING!!!!! thanks a lot!!!
joao
0
 
LVL 51

Expert Comment

by:Gustav Brock
You are welcome!

/gustav
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question