Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

compile error in query expression

Posted on 2017-08-13
8
Medium Priority
?
46 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
ID: 42252767
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
ID: 42252769
access 2016
0
 

Author Comment

by:João serras-pereira
ID: 42252771
when I try to run the form it crashes....
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 40

Expert Comment

by:als315
ID: 42252784
Please, open module and compile it
0
 
LVL 52

Expert Comment

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

/gustav
0
 
LVL 52

Accepted Solution

by:
Gustav Brock earned 2000 total points
ID: 42253451
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
ID: 42253632
Perfect!!!!! IT IS WORKING!!!!! thanks a lot!!!
joao
0
 
LVL 52

Expert Comment

by:Gustav Brock
ID: 42253638
You are welcome!

/gustav
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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