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

Unable to make form visible again

Greetings. I have three forms that are open at the same time. They are
related and cascading. The first form (frmEventAdd) is the anchor. Each
event can have many Trials. The second form is frmTrialInfo. Each Trial
can have three Classes. The third form is frmClassInfo. These forms are
used for update and adding new records.

The user displays an event for update (frmEventAdd). Then clicks on a
button to display the Trials for that event (opens frmTrialInfo).
frmTrialInfo displays information for one Trial at a time. The user
clicks on a button to display class information for that trial
(frmClassInfo).

One of the fields on frmClassInfo is called cboJudge. It's a combobox
with names of Judges (judges of dog competitions). The judge information
in the combobox comes from two tables: tblPeople and tblJudges. If the
user wants to add a new judge they may click on the btnNewJudge.
btnNewJudge will open a form that is used to add a new person
(frmPeople).

Because frmPeople is opened from many different points in the
application, I found it easier to simply make the three, already opened,
forms INVISIBLE.
So...command button btnNewJudge opens frmPeople and makes frmEventAdd,
frmTrialInfo, and frmClassInfo INVISIBLE.

When frmPeople is closed (btnClose), it checks to see if each of the
previously opened/visible windows is open and then makes each VISIBLE,
again. frmEventAdd and frmTrialInfo reappear just fine. However
frmClassInfo does not.

I have traced the btnClose_Click routine in frmPeople and it certainly
looks like every line of code is being hit, but the line that should
make frmClassInfo visible does not do anything (nor does it generate any
error).

Here is the code from btnClose_Click in frmPeople. Can you help me?

********************************************
Greetings. I have three forms that are open at the same time. They are
related and cascading. The first form (frmEventAdd) is the anchor. Each
event can have many Trials. The second form is frmTrialInfo. Each Trial
can have three Classes. The third form is frmClassInfo. These forms are
used for update and adding new records.

The user displays an event for update (frmEventAdd). Then clicks on a
button to display the Trials for that event (opens frmTrialInfo).
frmTrialInfo displays information for one Trial at a time. The user
clicks on a button to display class information for that trial
(frmClassInfo).

One of the fields on frmClassInfo is called cboJudge. It's a combobox
with names of Judges (judges of dog competitions). The judge information
in the combobox comes from two tables: tblPeople and tblJudges. If the
user wants to add a new judge they may click on the btnNewJudge.
btnNewJudge will open a form that is used to add a new person
(frmPeople).

Because frmPeople is opened from many different points in the
application, I found it easier to simply make the three, already opened,
forms INVISIBLE.
So...command button btnNewJudge opens frmPeople and makes frmEventAdd,
frmTrialInfo, and frmClassInfo INVISIBLE.

When frmPeople is closed (btnClose), it checks to see if each of the
previously opened/visible windows is open and then makes each VISIBLE,
again. frmEventAdd and frmTrialInfo reappear just fine. However
frmClassInfo does not.

I have traced the btnClose_Click routine in frmPeople and it certainly
looks like every line of code is being hit, but the line that should
make frmClassInfo visible does not do anything (nor does it generate any
error).

Here is the code from btnClose_Click in frmPeople. Can you help me?

********************************************

Private Sub btnClose_Click()
On Error GoTo Err_btnClose_Click

Dim blnEventAdd_Open As Boolean
Dim blnTrialInfo_Open As Boolean
Dim blnClassInfo_Open As Boolean

blnSecondChance = False

If blnDataChanged = True Then
If DataHasChanged() = vbYes Then
Call btnSave_Click
End If
End If
'================================================= ======================
=================
'blnSecondChance=False = NO SECOND CHANCE ... Close this Form
'blnSecondChance=True = USER GETS A SECOND CHANCE ... Do NOT Close
this Form

'================================================= ======================
=================
If blnSecondChance = False Then
'Zero out Relative Record Number from Array
svRecNo(intCallerIX) = 0
blnDoUpdate = False
blnDataChanged = False
DoCmd.Close acForm, Me.Name

'Is the frmEventAdd form open?
blnEventAdd_Open = SysCmd(acSysCmdGetObjectState, acForm,
"frmEventAdd") And _
acObjStateOpen
'Is the frmTrialInfo form open?
blnTrialInfo_Open = SysCmd(acSysCmdGetObjectState, acForm,
"frmTrialInfo") And _
acObjStateOpen
'Is the frmClassInfo form open?
blnClassInfo_Open = SysCmd(acSysCmdGetObjectState, acForm,
"frmClassInfo") And _
acObjStateOpen

If blnEventAdd_Open Or blnTrialInfo_Open Or blnClassInfo_Open
Then
If blnEventAdd_Open Then
Forms("frmEventAdd").Visible = True
Forms("frmEventAdd")!cboContact.Requery
Forms("frmEventAdd")!cboSecretary.Requery
End If
If blnTrialInfo_Open Then
Forms("frmTrialInfo").Visible = True
Forms("frmTrialInfo")!cboTrialRep.Requery
End If
If blnClassInfo_Open Then
Forms("frmClassInfo").Visible = True
Forms("frmClassInfo")!cboJudge.Requery
End If
intCallerIX = intCallerIX - 1
Else
DoCmd.OpenForm PopCaller(), acNormal
End If

'DoCmd.OpenForm PopCaller(), acNormal
End If

Exit_btnClose_Click:
Exit Sub

Err_btnClose_Click:
Call ShowError("frmPeople", "btnClose_Click", Err.Number,
Err.Description)
Resume Exit_btnClose_Click

End Sub

******************************************

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
3 6791
"Susan Bricker" <su*************@citigroup.com> wrote in message
news:y9**************@news.uswest.net...

When frmPeople is closed (btnClose), it checks to see if each of the
previously opened/visible windows is open and then makes each VISIBLE,
again. frmEventAdd and frmTrialInfo reappear just fine. However
frmClassInfo does not.

I have traced the btnClose_Click routine in frmPeople and it certainly
looks like every line of code is being hit, but the line that should
make frmClassInfo visible does not do anything (nor does it generate any
error).

Here is the code from btnClose_Click in frmPeople. Can you help me?

Hi Susan, just a shot in the dark but have you tried this configuration:

If blnEventAdd_Open Then
Forms("frmEventAdd").Visible = True
Forms("frmEventAdd")!cboContact.Requery
Forms("frmEventAdd")!cboSecretary.Requery
End If
If blnTrialInfo_Open Then
Forms("frmTrialInfo").Visible = True
Forms("frmTrialInfo")!cboTrialRep.Requery
End If
If blnClassInfo_Open Then
Forms("frmClassInfo").Visible = True
Forms("frmClassInfo")!cboJudge.Requery
End If
intCallerIX = intCallerIX - 1

If blnEventAdd_Open Or blnTrialInfo_Open Or blnClassInfo_Open
Then DoCmd.OpenForm PopCaller(), acNormal

Regards,
Keith.
www.keithwilby.com
Nov 13 '05 #2
Keith,

Thanks for the suggestion. But that won't work too well. If any of the
three forms is open I don't want to execute that docmd.openform. That's
the flow when frmPeople was opened from another form (that I had
previously closed ... therefore needed to reopen).

Again, thanks for the suggestion.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
"SueB" <sl*****@verizon.net> wrote in message
news:lp**************@news.uswest.net...

Again, thanks for the suggestion.

My mistake Susan, the last line of my suggestion should have read:

If Not blnEventAdd_Open And Not blnTrialInfo_Open And Not blnClassInfo_Open
Then DoCmd.OpenForm PopCaller(), acNormal

Clutching at straws as I can't really see anything wrong with your code.

Regards,
Keith.

Nov 13 '05 #4

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

Similar topics

1
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if...
7
by: Dave | last post by:
I have a button on Form1 that hides the form and displays Form2: Form2 myForm2 = new Form2(); myForm2.Show(); this.Hide(); After I do some work in Form2 I want to close it and redisplay...
6
by: vooose | last post by:
How would you determine if a window(Form) is visible. By visible I mean that you can currently see it, as apposed to Form.Visible. (which returns True when the window sits behind other windows) ...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
6
by: Cc | last post by:
hi, how do I make form background colour transparent when I set border style to none?
1
by: Beffmans | last post by:
hi I am trying to make this label visible through a checkbox. I try to make use of javascript but what am I doing wrong? <HTML> <HEAD> <title>WebForm1</title> <script>
16
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images,...
5
by: | last post by:
How can i make my form invisible public class Form1 : System.Windows.Forms.Form static void Main() {
2
by: lenniekuah | last post by:
Hullo Good Friends, I need your help. Please Help me. I am trying to pass the name of the Calling FORM FRMSALES to the Loaded FORM FRMPOPUPCustomers so that FRMPOPUPCustomer will set the FRMSALES...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.