Solved

Why frmStation pop out during processing

Posted on 2000-02-25
6
158 Views
Last Modified: 2010-05-02
Could someone please tell me why is the frmStation pop out during the execution whereas I didn't put frmStation.Show?

Private Sub Search()
:
:

criteria = "GaugeNo = '" & stno & "'"
frmStation.datLocation.Recordset.FindFirst criteria

If frmStation.datLocation.Recordset.NoMatch = True Then
    Msg = MsgBox("Could not find station based on gauge no: " & StationNo, vbExclamation, "Error")
    ILOCATION = UCase(InputBox("Please enter station name", "Station Name", , 3000, 2400))
Else
    ILOCATION = UCase(frmStation.datLocation.Recordset("StationName"))
End If

:
:
End Sub
0
Comment
Question by:suhani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 2557135
Perhaps because you're using data-bound controls and they're doing something to show their parent form?

0
 

Expert Comment

by:pinshah
ID: 2557154
if u start using controls on the forms the controls needs to be loaded which in turn loads the form and shows the form
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2557179
Who's "u"?

Yes... the controls need to be loaded, but that doesn't necessarily show the form.

Try this:

Private Sub Main()

Form1.Text1.Text = "hello world"

End Sub

Form is loaded, but not shown.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
PatrickVD earned 50 total points
ID: 2557673
Are you using MDIForm and child windows ???
If so, you might have forgotten to switch of the AutoShowChildren property of the MDIForm ?
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2557713
DOH! Never thought of that! Good point, Patrick.
0
 

Author Comment

by:suhani
ID: 2561990
Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question