472,781 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,781 software developers and data experts.

Menu callback function in Form's code module

Access 2k FE/BE

My application allows users to enter employee hours against rotas
(i.e. who is rostered on, and when).

They further want a function to output a report showing the number of
hours that each employee is rostered, and to be able to do this for
any week. To this end there is a control on the "Rota" form which
shows the "Week Commencing", with "Next >" and "< Previous" buttons.

They want to kick this report off using a menu item. So I created a
custom menu with an option "Calculate Hours", and put the callback
function in the code behind the "Rota" form (the "Rota" form must be
loaded to get the "Week Commencing" value.

However, if I put the code there, Access puts up an error:

"can't run the macro or callback function"

If I move the function to a module, it works.

This is not a big issue, but am I right therefore to conclude that
menu callback functions can ONLY exist in modules?


The reading group's reading group:
Nov 13 '05 #1
0 1781

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Egbert Bouwman | last post by:
I have difficulties in organizing my menus, especially in linking them to the underlying application logic. I try to follow the OO rules: the gui classes, in their own module gui.py, do the gui...
by: ThinkRS232 | last post by:
I have a Win32 DLL that has a standard _stdcall (WINAPI) exports. I am able to call these fine from C#. One call in particular however has a callback to a CDECL function. How would I set that up?...
by: Sean | last post by:
I want to use a custom menu as an input device for a form. I can assign a macro that calls a function for each submenu ie: Public Function Fall_to_Lower_Level_Unspecified() As String...
by: Richard Hollenbeck | last post by:
Back in the old days before I started learning about menubars (the day before yesterday,) I based all my operations on command buttons on the forms. Now the forms are all cluttered up with buttons...
by: jesse.hartwick | last post by:
Hey group! I have a toolbar with a "DEVELOPER" menu. I have it so that it when the menu title is clicked, a pop-up form will appear if the user has not yet verified that he or she has developer...
by: David | last post by:
Hi all, I am new to .Net environment. I have created a flat non-COM DLL from Visual C++ 6.0. It stores up a function pointer from caller, create a worker thread via WIN32 API, and then call...
by: jpr | last post by:
Hello, I have created menu bars for my access application and now would like to transfer many pieces of code in modules so that they can run using macros. I beleive this is the only way I can...
by: SQACPP | last post by:
Hi, I try to figure out how to use Callback procedure in a C++ form project The following code *work* perfectly on a console project #include "Windows.h" BOOL CALLBACK...
by: =?Utf-8?B?Sm9lbWFuYw==?= | last post by:
Hi, I'm trying to figure out the Callback method. I have a .dll that I call from a sub in my unmanaged code/calling program. That works just fine. But I'd like to have the .dll finish doing it's...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.