make two forms visible

L

lallen

I have a form with a button that opens a report. After opening the report, I
hide the two forms that are open. After closing the report, I want to make
the two forms visible again, but only the first one becomes visible.

I'm using the following code. The report can be opened from two places, so I
ensure that the form is open first.

If CurrentProject.AllForms("Appointments").IsLoaded Then
Forms![Appointments].Visible = True
Forms![Patients].Visible = True
End If

The first form becomes visible, but not the second. There are no error
messages, and it doesn't matter the order of the two statements?

Anyone have any ideas?
 
L

lallen

Can you point me to the other post? I spent an hour searching before I posted
this, and didn't find anything that answered my question.

Jeanette Cunningham said:
Answered in another post
lallen said:
I have a form with a button that opens a report. After opening the report,
I
hide the two forms that are open. After closing the report, I want to make
the two forms visible again, but only the first one becomes visible.

I'm using the following code. The report can be opened from two places, so
I
ensure that the form is open first.

If CurrentProject.AllForms("Appointments").IsLoaded Then
Forms![Appointments].Visible = True
Forms![Patients].Visible = True
End If

The first form becomes visible, but not the second. There are no error
messages, and it doesn't matter the order of the two statements?

Anyone have any ideas?
 
J

Jeanette Cunningham

lallen,
Apologies!! Sorry if I misled you, I was sure I read the answer, maybe it
was to another person.
The answer I remember that I thought was for you, concerned the 2 forms
where one form was a subform on the other form, and the way to write the
visible statement needed to be changed.

Are any of these forms subforms?
Does one form open on top, the other form opens but you can't see it because
it is behind the first form that opens?
Do any of the forms open using acDialog?
Do any of the forms have their popup property set to Yes?
Maybe the form that doesn't open has a problem with its recordsource and
fails to open because an error occurs in the code?

Jeanette Cunningham


lallen said:
Can you point me to the other post? I spent an hour searching before I
posted
this, and didn't find anything that answered my question.

Jeanette Cunningham said:
Answered in another post
lallen said:
I have a form with a button that opens a report. After opening the
report,
I
hide the two forms that are open. After closing the report, I want to
make
the two forms visible again, but only the first one becomes visible.

I'm using the following code. The report can be opened from two places,
so
I
ensure that the form is open first.

If CurrentProject.AllForms("Appointments").IsLoaded Then
Forms![Appointments].Visible = True
Forms![Patients].Visible = True
End If

The first form becomes visible, but not the second. There are no error
messages, and it doesn't matter the order of the two statements?

Anyone have any ideas?
 
L

lallen

Thanks Jeannette. The first form opened with acDialog. As soon as I removed
that, it worked like a charm. What had me confused was it wasn't always the
same form that wasn't visible. It was always the second one that I attempted
to make visible, even when I changed the order of the statements.

Thanks again Jeannette, and the best of the season to you.

....Larry

Jeanette Cunningham said:
lallen,
Apologies!! Sorry if I misled you, I was sure I read the answer, maybe it
was to another person.
The answer I remember that I thought was for you, concerned the 2 forms
where one form was a subform on the other form, and the way to write the
visible statement needed to be changed.

Are any of these forms subforms?
Does one form open on top, the other form opens but you can't see it because
it is behind the first form that opens?
Do any of the forms open using acDialog?
Do any of the forms have their popup property set to Yes?
Maybe the form that doesn't open has a problem with its recordsource and
fails to open because an error occurs in the code?

Jeanette Cunningham


lallen said:
Can you point me to the other post? I spent an hour searching before I
posted
this, and didn't find anything that answered my question.

Jeanette Cunningham said:
Answered in another post
I have a form with a button that opens a report. After opening the
report,
I
hide the two forms that are open. After closing the report, I want to
make
the two forms visible again, but only the first one becomes visible.

I'm using the following code. The report can be opened from two places,
so
I
ensure that the form is open first.

If CurrentProject.AllForms("Appointments").IsLoaded Then
Forms![Appointments].Visible = True
Forms![Patients].Visible = True
End If

The first form becomes visible, but not the second. There are no error
messages, and it doesn't matter the order of the two statements?

Anyone have any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top