Solved

Using AddressOf function in Access97 VBA

Posted on 1998-07-09
4
985 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views 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 Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

759 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

18 Experts available now in Live!

Get 1:1 Help Now