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

Setting an object to existing form generates 'can't find form' error

SMc
Hi

I am attempting to set global variable (bad practice, will replace
with class later, just exploring an idea) with the following code in
an startup module

from globaldec.bas...

Global gfrmClient As Form
Global gstrClientForm As String
from startup.bas..

gstrClientForm = "frmClients"
Set gfrmClient = Forms(gstrClientForm)

At runtime I get 'MSA can't find form "frmClients"'

Thanks in advance

S
Nov 13 '05 #1
1 1120
Is the form open at the time?
If not, it's not a member of the Forms collection.

HTH
- Turtle

"SMc" <se************@yahoo.ca> wrote in message
news:4e**************************@posting.google.c om...
Hi

I am attempting to set global variable (bad practice, will replace
with class later, just exploring an idea) with the following code in
an startup module

from globaldec.bas...

Global gfrmClient As Form
Global gstrClientForm As String
from startup.bas..

gstrClientForm = "frmClients"
Set gfrmClient = Forms(gstrClientForm)

At runtime I get 'MSA can't find form "frmClients"'

Thanks in advance

S

Nov 13 '05 #2

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

Similar topics

8
by: Stan Brown | last post by:
http://oakroadsystems.com/nonce/zonk.htm (12 lines) >...
8
by: Equilibrium | last post by:
what did I wrong with the program ? (use VC++) /* Using if statment, relational operators, and equality operators */ #include<stdio.h> int main() { printf("Enter two integers, and I will...
3
by: cindy | last post by:
I have a web form “Form1” with a panel. Inside the panel is a datalist. One of the items displays the field value “xyz” from the dataset. If the field is null the user clicks on a...
19
by: ashmangat | last post by:
Hi! now on the chapter "string-class" My assignment is below Word Counter: Write a function that accepts a pointer to a C-String as an argument and returns the number of words contained in the...
3
by: Radu | last post by:
Hi. I have the following: ___________________________________________________________________________________ Public Class SquareDictionary Inherits System.Collections.DictionaryBase Default...
28
by: Gaby | last post by:
Hi guys, I have this ASP code that is a little long to post so but you can download it off of http://whatthedeuce.net/Form.asp I cant find out what my error is. I know it is not in my Access...
2
by: Pucca | last post by:
Where can I find pre-defined Error code like OBJECT_ALREADY_EXISTS (HRESULT) for the DirectoryServicesCOMException.ErrorCode? I need it for the try-catch coding. Thanks.
22
by: clicwar | last post by:
A simple program with operator overloading and copy constructor: #include <iostream> #include <string> using namespace std; class Vector { private: float x,y; public: Vector(float u, float...
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
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
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
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 projectplanning, coding, testing,...

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.