Using AddressOf function in Access97 VBA

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 !!

little_Asked:
Who is Participating?
 
tomookConnect With a Mentor Commented:
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
 
little_Author Commented:
Edited text of question
0
 
TrygveCommented:
Do you have the CompareDates function in your application ?
0
 
little_Author Commented:
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
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.

All Courses

From novice to tech pro — start learning today.