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?

TIA

Edward
--
The reading group's reading group:
http://www.bookgroup.org.uk
Nov 13 '05 #1
0 1781

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

Similar topics

1
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...
3
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?...
2
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...
3
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...
4
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...
2
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...
4
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...
10
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...
6
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...
0
linyimin
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...
0
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...
0
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 ...
14
DJRhino1175
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...
5
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...
0
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=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
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.