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

opening a form from within another form

Hello
I'm trying to open a form from within another form
I do this several times, and it works okay, but it won't work for this specific form
There are 4 forms that show in the Solutions list, but only 2 of them show up automatically when typing the code to open them
I'm using the code
dim nFrm as new frm_myfor

but am getting the error "frm_myform is not defined"
I use this exact same code to open other forms from forms..
I am not new to programming, but am very new to VB.net
What is the problem here
Thanks
ambe

Nov 20 '05 #1
4 1516
Hi Amber,

Does your solution have frm_myform.vb in it? Also, does intellisense show
this as a valid type when you are typing it in?

Bernie Yaeger

"amber" <an*******@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
Hello,
I'm trying to open a form from within another form.
I do this several times, and it works okay, but it won't work for this specific form. There are 4 forms that show in the Solutions list, but only 2 of them show up automatically when typing the code to open them. I'm using the code:
dim nFrm as new frm_myform

but am getting the error "frm_myform is not defined".
I use this exact same code to open other forms from forms...
I am not new to programming, but am very new to VB.net.
What is the problem here?
Thanks,
amber

Nov 20 '05 #2
Hi Bernie,
Yes, frm_myform is showing up in the Solutions window, but no, intellisense does not display it as a choice when typing the code.
As I said, there are 4 forms that show up in the Solutions window, but only two are options with intellisense while typing the code.
I'm baffled!
Thanks :)
amber

Nov 20 '05 #3
"amber" <an*******@discussions.microsoft.com> wrote in message
news:6B**********************************@microsof t.com...
Hi Bernie,
Yes, frm_myform is showing up in the Solutions window, but no, intellisense does not display it as a choice when typing the code. As I said, there are 4 forms that show up in the Solutions window, but only two are options with intellisense while typing the code. I'm baffled!
Thanks :)
amber

Check to see that the form Class has the same name as the form name. Also
check same in the #Region code.....just a thought.
Nov 20 '05 #4
* "=?Utf-8?B?YW1iZXI=?=" <an*******@discussions.microsoft.com> scripsit:
I'm trying to open a form from within another form.
I do this several times, and it works okay, but it won't work for this specific form.
There are 4 forms that show in the Solutions list, but only 2 of them show up automatically when typing the code to open them.
I'm using the code:
dim nFrm as new frm_myform

but am getting the error "frm_myform is not defined".
I use this exact same code to open other forms from forms...
I am not new to programming, but am very new to VB.net.


The code should work if the forms are defined and the modifiers of the
forms are set to 'Public', 'Friend', or something similar. Make sure
the form's code starts with something like that:

\\\
Public Class Form1
Inherits System.Windows.Forms.Form

Nov 20 '05 #5

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

Similar topics

3
by: VanIkyn | last post by:
Hello peoples, This is a last resort, as I've run out of search strings I can think of for this problem. There may very well be a simple and logical solution that I have overlooked. Thanks in...
9
by: MLH | last post by:
If you have these lines in code on MyForm1... DoCmd OpenForm "MyForm2`" MsgBox "I opened MyForm2" Is it #ALWAYS# true that all form events on MyForm2 will occur before the MsgBox statement...
11
by: Susan Bricker | last post by:
Hi. I am trying to open a form using 'openargs' parameter of the docmd.openform action. The problem is that I would like to pass the form some character (string) and integer data. My plan was to...
4
by: Jelmer | last post by:
Hi I've been trying to create an addin similar to Find & Replace from Rick Fisher that looks thru your tables / queries / forms / modules etc.. for a reference to a string and optionally let's you...
3
by: yup | last post by:
I was wondering if you know a way to have, let's say, you would click on a menu bar item (where something like file, edit, format, help options are on Microsoft Word) and instead of opening a...
12
by: insomniux | last post by:
Hi, In my database (access 2000) everything is done within the main form ("OpenForm"). It has a timer which triggers the code below. It first closes all reports and forms. Then it reopens the main...
9
by: angi35 | last post by:
Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be...
16
by: Phil Stanton | last post by:
I have a form with a button which is supposed to open an Excel file (With lots of Macros /VBA) in it. The Excel file gets it's data from the Access program Here is the code Private Sub...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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,...

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.