473,385 Members | 1,536 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,385 software developers and data experts.

Application.CurrentObjectName returns no value?

Hello

I completed an application that worked great until I went to STARTUP
and shut off all of the checkboxes. My code uses
"Application.CurrentObjectName" to get the current Form name.
All my forms seem OK, but my problem exists ONLY in my initial form. If
the DataBaseWindow selection in STARTUP is OFF, then the
Application.CurrentObjectName in my initial form returns no value,
which is wrong. When DBW is ON then I get the correct Form name. I
test using a Msgbox in the Form_Open and Form_Load and only get a true
value when the STARTUP DBW is ON. However, when the STARTUP DBW is Off
(my desire), then I can only get a correct value from the
CurrentObjectName, if I call it from a button on the form, the values
returned from the Form_Open & Form_Load is empty.

What Gives?

Jul 10 '06 #1
3 2861
well, if you want to get the name of the current form object as it opens or
loads, you can get that in the Open or Load event, as

Me.Name

hth
<Ap******@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
Hello

I completed an application that worked great until I went to STARTUP
and shut off all of the checkboxes. My code uses
"Application.CurrentObjectName" to get the current Form name.
All my forms seem OK, but my problem exists ONLY in my initial form. If
the DataBaseWindow selection in STARTUP is OFF, then the
Application.CurrentObjectName in my initial form returns no value,
which is wrong. When DBW is ON then I get the correct Form name. I
test using a Msgbox in the Form_Open and Form_Load and only get a true
value when the STARTUP DBW is ON. However, when the STARTUP DBW is Off
(my desire), then I can only get a correct value from the
CurrentObjectName, if I call it from a button on the form, the values
returned from the Form_Open & Form_Load is empty.

What Gives?

Jul 10 '06 #2
Hi Tina

Thankyou for responding. I am aware of your suggestion, unfortunately
this will not solve my problem readily. My problem actually takes
place in a Module1. This is where a have a Procedure that LogsErrors.
The Application.CurrentObjectName was used here, and would properly
return the correct formname where the error occurred, in the Forms
outside the module that has focus. If I were to use Me.Name, it would
have to occur in each seperate Form, and pass a variable to the
proceedure, requiring me to modify all my ErrorHandling for all
Procedures... HUGE. >WHEN WILL THIS APP BE DONE! I believe,
Application.CurrentObjectName should work. Any place I can find
detailed info on this statement ?

ThanksAgain
Greg

tina wrote:
well, if you want to get the name of the current form object as it opens or
loads, you can get that in the Open or Load event, as

Me.Name

hth
<Ap******@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
Hello

I completed an application that worked great until I went to STARTUP
and shut off all of the checkboxes. My code uses
"Application.CurrentObjectName" to get the current Form name.
All my forms seem OK, but my problem exists ONLY in my initial form. If
the DataBaseWindow selection in STARTUP is OFF, then the
Application.CurrentObjectName in my initial form returns no value,
which is wrong. When DBW is ON then I get the correct Form name. I
test using a Msgbox in the Form_Open and Form_Load and only get a true
value when the STARTUP DBW is ON. However, when the STARTUP DBW is Off
(my desire), then I can only get a correct value from the
CurrentObjectName, if I call it from a button on the form, the values
returned from the Form_Open & Form_Load is empty.

What Gives?
Jul 10 '06 #3
I'M NOT SURE, but this may be my problem:

I'm collecting the name of the active object, but a form does not
become
the active object until after its Open, Load, and even Current events
have
fired.

The ActiveForm object is not established or changed until a form
receives the focus. This is true for both Form View and Design View.
However in Form View, when a form is opened, a sequence of form Focus
events occurs : Open , Load , Resize , Activate , Current.

Ap******@gmail.com wrote:
Hi Tina

Thankyou for responding. I am aware of your suggestion, unfortunately
this will not solve my problem readily. My problem actually takes
place in a Module1. This is where a have a Procedure that LogsErrors.
The Application.CurrentObjectName was used here, and would properly
return the correct formname where the error occurred, in the Forms
outside the module that has focus. If I were to use Me.Name, it would
have to occur in each seperate Form, and pass a variable to the
proceedure, requiring me to modify all my ErrorHandling for all
Procedures... HUGE. >WHEN WILL THIS APP BE DONE! I believe,
Application.CurrentObjectName should work. Any place I can find
detailed info on this statement ?

ThanksAgain
Greg

tina wrote:
well, if you want to get the name of the current form object as it opens or
loads, you can get that in the Open or Load event, as

Me.Name

hth
<Ap******@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
Hello
>
I completed an application that worked great until I went to STARTUP
and shut off all of the checkboxes. My code uses
"Application.CurrentObjectName" to get the current Form name.
All my forms seem OK, but my problem exists ONLY in my initial form. If
the DataBaseWindow selection in STARTUP is OFF, then the
Application.CurrentObjectName in my initial form returns no value,
which is wrong. When DBW is ON then I get the correct Form name. I
test using a Msgbox in the Form_Open and Form_Load and only get a true
value when the STARTUP DBW is ON. However, when the STARTUP DBW is Off
(my desire), then I can only get a correct value from the
CurrentObjectName, if I call it from a button on the form, the values
returned from the Form_Open & Form_Load is empty.
>
What Gives?
>
Jul 10 '06 #4

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

Similar topics

4
by: bruce | last post by:
Hello, I'm almost embarrassed to ask this question, but my searches have not yielded any results. How does one change what the Application.Name property returns in Access 2003? I see that it...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
1
by: Dave Clarke | last post by:
I'm looking for some feedback about an application I'm writing. In a nutshell a message is received, parsed, a mainframe transaction generated, and a response returned. I am intending to use a...
4
by: Julie | last post by:
I stumbled across Application from someone else's code, and I can't find out squat about by searching MS, Google, or Google Groups. For the most part, this is returning the fully-qualified name...
3
by: Support | last post by:
Hello: I have done some research on the following but still not clear as what mechanism is preferable PROBLEM: In a VB.NET environment, I will have two applications. Application (A) will do...
2
by: Alan Foxmore | last post by:
Hi Everyone, I'm new to ASP.NET so maybe this is easy. I'm using ASP.NET 2.0. I'm finding that the Application object (the HttpApplicationState object) is allowing me to add the same key...
6
by: MayBoy | last post by:
Hi There I am trying to use the Goto method of the Word ActiveX object. I am trying to open a document and go to a named bookmark. If I use this code in VB it works, so I'm sure the approach is...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
1
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.