473,785 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do I "FORMS"

Dib
Hi,

how do I call a form to open from another form.

example

I have a frmLogIn and an frmError

The frmError have a ListBox. If the frmLogin generated an error I want the
error to show in the ListBox on frmError.

Here is the code I have

Private Sub ErrorLog()

Dim errLoop As ADODB.Error

' Change mousepointer to normal.

System.Windows. Forms.Cursor.Cu rrent =
System.Windows. Forms.Cursors.W aitCursor

Select Case errcase

Case 1, 2, 3

If errcase = 1 Then

If Cn.Errors.Count = 0 Then

Exit Sub

End If

End If

If errcase = 2 Then

Response = MsgBox(MsgConnU n, vbOKOnly, Title)

End If

If errcase = 3 Then

If Cn.Errors.Count = 0 Then

Exit Sub

End If

End If

For Each errLoop In Cn.Errors

Dim strError(5)

Dim i As Integer

strError(0) = "Error Number: " & errLoop.Number

strError(1) = " Description: " & errLoop.Descrip tion

strError(2) = " Source: " & errLoop.Source

strError(3) = " SQL State: " & errLoop.SQLStat e

strError(4) = " Native Error: " & errLoop.NativeE rror

i = 0

Do While i < 5

frmError.lstErr ors.Items.add(s trError(i)) 'Error is here lstErrors is the
ListBox

i = i + 1

Loop

frmError.lstErr ors.Items.add(" ") 'Error is here lstErrors is the ListBox

Next ' Continue looping through ADO Errors collection.

' Create string for summary count of errors.

c = Cn.Errors.Count & " provider error(s) occurred."

' Display a count of the provider errors.

frmError.lstErr ors.Items.add(c ) 'Error is here lstErrors is the ListBox

'frmError.lstEr rors.Items.add( "") 'Error is here lstErrors is the ListBox

frmError.Show() 'Error is here

' Clear the ADO errors collection.

Cn.Errors.Clear ()

Case Else ' Fall-through case statement.

Exit Sub

End Select

End Sub

Thanks

Dib
Nov 21 '05 #1
1 1429

"Dib" <dN************ @conNOSPAMsoftw are.com> wrote
how do I call a form to open from another form.
Declare the form variable name before you use it, like you would
any other variable name....

Private Sub ErrorLog()

Dim errLoop As ADODB.Error

Dim frmError As New frmError
See if that helps....
LFS
Nov 21 '05 #2

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

Similar topics

0
1411
by: Simon Verona | last post by:
I know this is a little of topic, for which I apologise, but I think it's pertinent to .Net development so I hope it's ok to ask this question here! I'm looking to created filled in "forms" from my application eg Sales Orders, Quotations etc which have data filled in from my application. I want my users to be able to design their own form templates (eg to include their company logos, terms and conditions etc). The standard .Net...
0
1638
by: Woody Lemcke | last post by:
Hello all, Would you gurus please share your wisdom on any DB2 equivalents to the Informix "Forms" input form utility and "Ace" report generating utility? The input form will probably be accessed by telneting from a Linux shell or Windows command prompt and used for updating a lab database. Thanks and regards, Woody Lemcke
0
1219
by: gmarquez | last post by:
Hello, I am using "FORMS" authentication, without SSL the behavior is normal, everythings working very well. When in IIS I cheking "Require SSL" (in Secure Communications property), I can't to do login, after introducing the credentials, I am redirected to login's page again, If I take the SSL's Check off in the ISS property, everythings will work very well again. NOTE: I have a valid certificate well installed. What is happening?,...
1
1817
by: Anton ml. Vaheie | last post by:
How do I convince (what I have to set in asp.net server) that my program that is using <authentication mode="Forms" /> can write to, copy, etc. files in directories on local disk? I have given full permisions to local directory (IUSR_Machinename user), but I still get: "System.UnauthorizedAccessException: Access to the path "D:\Inetpub\wwwroot\". Any idea how to change it?
0
5614
by: Angel | last post by:
Hi I have a problem with my web applications. I believe the problem is somehow connected to HttpSession. I use form authentication in my project. Once I authenticate the user and redirect to default page I create an User object and assign this object to session. Then in other forms I access this object and use it to load data from database. Some times I keep data in the object as a property of object. For example let say my object is...
6
1530
by: Alan Silver | last post by:
Hello, I have a page that displays a data list with info from a database. The grid has the usual stuff, edit, update, delete etc. Below this I have a section where they can add a new entry to the list. This has some text boxes for the data, and a button to click when they are ready to submit. To the user, this looks like two separate forms, one containing a grid of existing data and one where they add new data.
4
9917
by: Scott Johnson | last post by:
Hi! Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms? Some of these forms have tab strips with lots of controls and database queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still entering data. (For example, my user visits screen A then B then...
1
1824
by: Troy Bull | last post by:
Greetings I am trying to use a singleton to hold a group of forms. I have a MDIMaster form. I have a class called Forms; Forms is a singleton. I want to do something like the following. In MDIMaster (and other forms), I want to get an instance of Forms (the only instance). Inside Forms then there are public variables for each of the possible forms, if a "form" has never been accessed the Forms factory creates a new instance of the...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10336
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10095
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6741
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.