hidden form problem

CALV

Registered User.
Local time
Today, 15:52
Joined
Apr 25, 2001
Messages
74
Hi all,

I have a sort of menu form which, when initially opened, opens several other forms but hidden, this works for most of the forms, but I recently added a new form to the dbase and it doesnt work! heres what I have in the on load of the menu form:


DoCmd.OpenForm "first form", , , , , acHidden
DoCmd.OpenForm "second form", , , , , acHidden
DoCmd.OpenForm "third form", , , , , acHidden
etc etc

now each of the above is activated by using a cmd button, whos code is:

docmd.openform "form name"

this all works perfectly apart from my new form, when I click the button, nothing happens! I played about with the forms on load, on resize etc to see if I could get it to work, but nothing at all. Can anyone suggest why this may be? the form is definately open (but invisible) since if I try to rename it in the main dbase window, it says I cant because its open.

TIA

CALV


Edit:
If I remove the recordsource from the form, it works fine!
 
Last edited:
ok this is getting mad :(

I changed the code slightly for when the button is clicked to display the form to:

DoCmd.OpenForm "form name", acNormal, , , , acWindowNormal

this now opens the form, BUT the form is EMPTY!! its just a totally empty form, however when I slightly resize the form, everything pops back on it! (the stuff on the form isnt out of view or anything), AND if I then hide the form again (escape key which runs the code:

DoCmd.Minimize: Me.Visible = False

and then re click the button to display it, it works fine! and fine from there on, its just the very first time it opens that it doesnt display properly, how can this be?


TIA

CALV
 
CALV,

Have you tried the usual; compact/repair or import everything into
a blank database?

When things get that flaky, that sometimes works.

Wayne
 
Thanks for the reply, I tried a compact/repair- no joy
I then tried making a form with the same recordsource as the problem form, but with a single button (no code- just to see if it displayed) and a textbox bound to a field from the query. now heres where it gets odder! the query takes one of its criteria from another form, in this case a postcode, if the form with the postcode on isnt open, rather than the usual #name being displayed in the textbox, I get a BLANK FORM!! but if theres a postcode on the main form, its fine. So I then made a button on the main form to open this new temporary form, and regardless of whats in the postcode on the main form, the first time it opens, its BLANK, but if I then hide it, then reclick the open button, its fine!!.
I'm not sure how I go about importing into a blank dbase? it has a lot of forms, queries, linked tables etc, how do I go about this?

TIA

CALV

Edit: Its ok, I imported it all, same problem tho :(
 
Last edited:
Calv,

To import into a blank database, just start Access (not by
clicking on an .mdb icon) but by Start --> Programs.

Choose open a blank database.

Do File --> Get external information --> Import

Do Select All

Then try it.

Sometimes a form, or even an entire database can go "brain dead"
and not act in a rational manner at all.

Other than that, I don't have any ideas on this.

Wayne
 
Thanks,

Looks like I was editing at the same time as you posted, sory to have wasted your time :(

CALV
 

Users who are viewing this thread

Back
Top Bottom