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

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.Current =
System.Windows.Forms.Cursors.WaitCursor

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(MsgConnUn, 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.Description

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

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

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

i = 0

Do While i < 5

frmError.lstErrors.Items.add(strError(i)) 'Error is here lstErrors is the
ListBox

i = i + 1

Loop

frmError.lstErrors.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.lstErrors.Items.add(c) 'Error is here lstErrors is the ListBox

'frmError.lstErrors.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 1411

"Dib" <dN************@conNOSPAMsoftware.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
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...
0
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...
0
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...
1
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...
0
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...
6
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...
4
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...
1
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...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.