Solved

Using AddressOf function in Access97 VBA

Posted on 1998-07-09
4
987 Views
Last Modified: 2012-08-13
I'm using the following code in my database to sort a listview control..

SendMessage axLV1.hWnd, LVM_SORTITEMS, axLV1.hWnd, AddressOf CompareDates
and each and every time i want to write this line, in any fashion i could imagine, access responded me Expected : Expression..

When i write AddressOf and i press space, Access gives me suggestions on the function names i can use and i use one of them, but Access keeps telling me that it expects an expression... !!!  Help me please !!

0
Comment
Question by:little_
  • 2
4 Comments
 

Author Comment

by:little_
ID: 1976442
Edited text of question
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1976443
Do you have the CompareDates function in your application ?
0
 

Author Comment

by:little_
ID: 1976444
Yes, the function exists.  When i press the space bar after writing the addressof expression, the function i want to uses is part of the choices in the list.
0
 
LVL 4

Accepted Solution

by:
tomook earned 50 total points
ID: 1976445
The Declare statement for SendMessage must define the parameter to receive the AddressOf "As Any". If this is not it, please post the declaration for SendMessage and CompareDates.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

864 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now