473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

access 97 : command button question

hello

this is absolutely ridiculous :) i have a simple form where if you
click the "main menu" command button it should ideally go to the main
menu . however, each time i click the menu command button i receive
an error message "the expression On Click you entered as an event
property setting produced the following error: user-defined type not
defined." i just don't understand when i actually used the wizard or
have the simple code of the following:

private sub btnMainMenu()
docmd.close
end sub

any help would be appreciated :)
thanks! jung
Nov 12 '05 #1
3 3690
The OnClick event in the button's Properties sheet needs to be set to [Event Procedure],
the first line of the procedure should be

Private Sub btnMainMenu_Click()

--
Wayne Morgan
"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
hello

this is absolutely ridiculous :) i have a simple form where if you
click the "main menu" command button it should ideally go to the main
menu . however, each time i click the menu command button i receive
an error message "the expression On Click you entered as an event
property setting produced the following error: user-defined type not
defined." i just don't understand when i actually used the wizard or
have the simple code of the following:

private sub btnMainMenu()
docmd.close
end sub

any help would be appreciated :)
thanks! jung

Nov 12 '05 #2
pi******@yahoo.fr (JMCN) wrote in
news:27**************************@posting.google.c om:
hello

this is absolutely ridiculous :) i have a simple form where if
you click the "main menu" command button it should ideally go
to the main menu . however, each time i click the menu
command button i receive an error message "the expression On
Click you entered as an event property setting produced the
following error: user-defined type not defined." i just don't
understand when i actually used the wizard or have the simple
code of the following:

private sub btnMainMenu()
docmd.close
end sub

any help would be appreciated :)
thanks! jung


In the OnClick event of your button, change the btnmainmenu() to
Event Procedure, then rename your function to
private sub btnMainMenu_click() instead of btnMainMenu()
Bob Q.
Nov 12 '05 #3
> In the OnClick event of your button, change the btnmainmenu() to
Event Procedure, then rename your function to
private sub btnMainMenu_click() instead of btnMainMenu()
Bob Q.


Thanks for your help but I realized when I sent this post, it was a
typo because I forgot to type in "_click" after the btnMainMenu.

Thanks fo you suggestions. I think I'm going to start over and
recreate the form.

Jung
Nov 12 '05 #4

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

Similar topics

1
by: Nathan Bloom | last post by:
Is there a way to force the user of a database to exit and close access through a close button on for example a switchboard menu? If a user closes access by the exit command or the close button...
4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
4
by: Megan | last post by:
Okay, I have a few questions regarding an Access database our company has. I should first mention that I'm not that knowledgable in Access and don't really know how to use it, but I am learning. We...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
0
by: aviklund | last post by:
Hi, I made a simple data access page with a search button that does work properly, but now I would like to add a filtering to the command button also. Ideal solution would be like this: ...
1
by: sharathragunathan | last post by:
HI, I have an Access novice and I have a question.I have a form that has a request date that a user enters. What I need is when you click on a command button, say Elapsed Time, it should give...
4
by: zufie | last post by:
I have a main form containing a command SEND button that prompts an email form to pop up. The email address(es) that are supposed to appear on the email form are those corresponding to the...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
1
MitchR
by: MitchR | last post by:
Good Morning Folks; I have a question that is pretty far fetched but here goes nothing... I am looking to find a way to insert a macro into an Excel command button located in an Access VBA...
2
by: falroc | last post by:
I created a Access 2007 database that had a add record command button that worked just fine until I split the database and made Sqlexpress 2005 the backend. Now, when I click on the add record...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.