If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
how to pass form name to a module?
Greeting,
I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! |
#2
|
|||
|
|||
how to pass form name to a module?
Jon
Something like (untested): YourFunction(strName as String) ... and to call it from within a form, on a button click, you could use: Call YourFunction(Me.Name) Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Jon" wrote in message ... Greeting, I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! |
#3
|
|||
|
|||
how to pass form name to a module?
Call the function in your OnClick event.
Pass the form name as a parameter to your procedure or function. Call DisplayFormName("formname") -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "Jon" wrote: Greeting, I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! |
#4
|
|||
|
|||
how to pass form name to a module?
Thank you all,
but could you please provide full code? also, I want to to display the form name in msgbox please? "Jeff Boyce" wrote: Jon Something like (untested): YourFunction(strName as String) ... and to call it from within a form, on a button click, you could use: Call YourFunction(Me.Name) Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Jon" wrote in message ... Greeting, I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! . |
#5
|
|||
|
|||
how to pass form name to a module?
Public Function MyFunction()
On Error Resume Next MsgBox Screen.ActiveForm.Name On Error Goto 0 MyFunction=0 End Function "Jon" schrieb im Newsbeitrag ... Thank you all, but could you please provide full code? also, I want to to display the form name in msgbox please? "Jeff Boyce" wrote: Jon Something like (untested): YourFunction(strName as String) ... and to call it from within a form, on a button click, you could use: Call YourFunction(Me.Name) Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Jon" wrote in message ... Greeting, I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! . |
#6
|
|||
|
|||
how to pass form name to a module?
It appears Alexander has provided this.
I'm curious why you've not posted the code you've already tried. Are we creating this for you, something like a homework assignment, or helping you create it? Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Jon" wrote in message ... Thank you all, but could you please provide full code? also, I want to to display the form name in msgbox please? "Jeff Boyce" wrote: Jon Something like (untested): YourFunction(strName as String) ... and to call it from within a form, on a button click, you could use: Call YourFunction(Me.Name) Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Jon" wrote in message ... Greeting, I want to display the current form name when clicke on a button in the form, but I want to use a module for that? any help please!!! . |
Thread Tools | |
Display Modes | |
|
|