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

Why is Me. suddenly not Okay?

1,271 Expert 1GB
So, I had this bright idea today that didn't quite work out. Or maybe it is working out but requires me to change a habit. I'm working on a form that will be a sub-form of another form. During initial development, I find it easier or better to work on the form as stand-alone entity rather than a sub-form. One reason is that I can edit the form using the entire screen instead of just that portion of the main form allocated to the sub-form.

Anyway, this sub-form references some objects on the parent form. Those same named objects exist on the sub-form, so I thought why don't I do this:
Expand|Select|Wrap|Line Numbers
  1. dim obj as object
  2. set obj = Me
and then replace this
Expand|Select|Wrap|Line Numbers
  1. me.parent.controlname ...
  2. to
  3. obj.controlname
Then, when I am ready to put the two forms together, all I have to do is change
Expand|Select|Wrap|Line Numbers
  1. set obj = me
  2. to
  3. set obj = me.parent
Voila, all good, right? Well, the weirdest thing happened. Suddenly, I got compile errors in both the main form and sub-form. The compiler was telling me that object names didn't exist that I knew darn well existed. I have been running the main form for several days.

I tried this experiment. I changed an object name from "Salesman_filter" to "Tsalesman_filter", and I changed my code from Me.Salesman_filter to Me.Tsalesman_filter, and then the compiler was happy. The compile error was now reported a few lines further down on a reference to another object. I changed Tsalesman_filter back to Salesman_filter and the compiler was still happy with the Me. reference, but still unhappy with the following reference to a different object.

So very weird. Then I tried changing the Me. references to Me! references, and the compiler stopped seeing an error. I changed all my Me. references to Me! references and no more errors.

What in the world happened? Can any of you explain this?

Thanks!
Jan 12 '24 #1
3 27065
NeoPa
32,556 Expert Mod 16PB
Hi Jim.

I'm not sure your explanation paints a very clear picture of the situation you're in. Do you have a minimalised (Remove everything except items germane to the issue) version you could possibly Zip & attach. I suspect I'll also require some straightforward instructions detailing precisely what you did; in which order; what results you saw at each stage.

I can say that your description doesn't match any expectation I'd have, regardless of how I interpreted what you've said. Nothing comes to mind at all at this point. However, I'm happy to look into it in more detail once I have a clear understanding of what I need to focus on.

It may be helpful also, to include information from Colin's Access/Windows/Office365 Version Checker. I have access only to 2019 ATM so anything that needs a version later than that will keep me from investigating further. Very unlikely of course.
Jan 12 '24 #2
jimatqsi
1,271 Expert 1GB
NeoPa,
I'm sorry I have not gotten back to this yet. I appreciate your interest in helping. I did fail to mention in my post that I have tried decompiling and recompiling, as well as Compact and Repair. I have backups that I can use to, presumably, repeat the process and see if the issue follows suit.

However, at the moment other issues are more pressing. The code my post refers to is part of a project for the not too distant future, but not today. I do want to understand what happened, so I will return to this, and hopefully, soon.

The question about version is certainly relevant. I've got a developer's license and the details are
MS 365 Apps for Enterprise
Version 2312 (Build 17126.20132 Click to Run)
Current Channel

Otherwise, I have reread my post and don't see anything I would change, except those steps I performed but didn't mention. I mean the post describes pretty well the sequence of events as I remember them.

I'd have to import some local data and change some links before I could hope to make a shareable database. I may yet do that, because I'd like for someone else to see this.

I will try to reproduce this and post an update.

Thanks for your interest!
Jan 16 '24 #3
NeoPa
32,556 Expert Mod 16PB
Hi Jim.

There's no rush. I hover & monitor most of the time but I can't promise I'll be able to throw much light on this. From what I understand this isn't behaviour I'd expect. Being able to reproduce your steps exactly would certainly help when you get to that stage, but I'll look at whatever you have. No promises even if you made a video showing all your steps exactly, but generally the more accurately I follow in your footsteps the higher the chance there is of me being able to help.

I'm also only able to test within 2019 ATM, so if it's the result of a recent update then I probably won't even get to see it.

You do what you can & I'll do what I can, and I hope we can manage to find something between the two of us :-)
Jan 16 '24 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: allenj | last post by:
DB2 UDB 7.2 WSE Fixpak 9 Linux Red Hat 7.3 A very strange thing just happened w/ my DB2 server. I am on Linux and using NIS - the instance owner is in the servers /etc/passwd file. Suddenly,...
12
by: melanieab | last post by:
Hi, I have a button that, when clicked, saves all the info entered. It worked fine until suddenly it didn't, and I have no idea why. I get the error An unhandled exception of type...
0
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET...
0
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET...
35
by: Frederick Gotham | last post by:
(Before I begin, please don't suggest to me to use "std::vector" rather than actual arrays.) I understand that an object can have resources (e.g. dynamically allocated memory), and so we have to...
6
by: Pieter | last post by:
Hi, I developed an Outlook Add In (VB.NET 2005, for Outlook 2003) that sometimes suddenly stops loading. I've put everywhere in the code Exception Handlers, but no Exception is catched. it...
2
by: MOHAN6491 | last post by:
Dear Friends, Please suggest me to solve my problem I have 4 systems connected in LAN. System are not connected to Internet. From the last month, Suddenly, the system halts without any responce...
3
by: =?Utf-8?B?R3JlZw==?= | last post by:
The opening movie is suddenly blurry in Rise of Nations. I think I've either accidently deleted a Windows System filter or one or more video filters has become corrupted. I've checked and I...
1
by: teddysnips | last post by:
I recently had to rebuild an instance of SQL Server. When it was restarted, one of the client apps (ASP.NET) could not connect - the user could see the login screen, but it kept throwing...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.