Blank Form? (1 Viewer)

Randomblink

The Irreverent Reverend
Local time
Today, 03:54
Joined
Jul 23, 2001
Messages
279
Alright...
I have been working with Access for about 8-10 years now...
I am very competent with designing forms and working with VB(A)...
But I cannot for the life of me understand something...

I just built a form, fresh, and no matter what I did... If I went into VIEW mode for it, I got a blank window... No fields... Just a background and the control buttons (min, max, close). I couldn't for the life of me understand what the problem was. The forms' recordsource was to a table with around 4 or 5 records... The form was set to ALLOWADDITIONS... everything was as it should be...

I didn't do any fancy coding for this form...
I didn't do any fancy sql for this form...

So I went to this board (the ONLY place to go for Access Questions) and looked up "Blank Form"... There were of course the HUNDREDS of answers posted about ALLOW ADDITIONS setting to be switched to no... Then there were a couple others about other minor settings...

Nothing I did made the form work...
I changed ALLOW ADDITIONS... I changed the Recordsource to a QUERY built off the table... (basically just a copy). I went to the table and checked and changed the settings... I did EVERYTHING...

Then I ran across a post that made me laugh... The 'idiot' recommended to a BLANK FORM user to copy-and-paste the broken form to a new form... Whatever?!

Ok... After a couple of hours of tweaking settings... I finally created a blank form and copied-and-pasted the broken form into the new form AND IT WORKED!!!!

That 'idiot' was NOT an idiot... Apparently ACCESS was the idiot... Can anyone tell me what happened? I cannot understand what the freak happened with this form... I blew like 2-3 hours on a problem that apparently wasn't anything I did wrong... It was a weird glitch...??? ARGH! Curious...
 

Dreamboat

Smack in the Middle
Local time
Today, 04:54
Joined
Jun 24, 2000
Messages
106
Wow. I consider this more like you got lucky. I love those weird troubleshooting tips, though, so I'm glad to know this one. :)
 

missinglinq

AWF VIP
Local time
Today, 04:54
Joined
Jun 20, 2003
Messages
6,420
When copying things to a blank form solves a problem the usual culprit is a corrupted form. No one (to my knowledge) knows what causes corruption of forms/tables or entire databases, they just happen (you know, "&#@* just happens"). I've had forms that I've developed and have had running for months go bad. One time simply by add a single label! But it is truly amazing how many times simply copying to another form solves the problem. I suspect part of the problem lies in the fact that Access has automated programming that so very complicated!

Glad you solved your problem!

The Missinglinq
 

Randomblink

The Irreverent Reverend
Local time
Today, 03:54
Joined
Jul 23, 2001
Messages
279
missinglinq said:
I've had forms that I've developed and have had running for months go bad. One time simply by add a single label!

Missingling,

You just reminded me of something. Forms have a limit of how many 'objects' (buttons, lables, textboxes, etc...) they can have on them... And even when you 'DELETE' some, you have still used up part of your alloted amount... This form that I was having problems on I have copied and pasted several hundred groupings of labels in it... SO I think I just used up my allotment of items...

I wonder...
 

ghudson

Registered User.
Local time
Today, 04:54
Joined
Jun 8, 2002
Messages
6,194
Have you ever decompiled your db?

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "X:\YourDB.mdb" /decompile

After you decompile it you then have to compile it. The last step is to compact the db. You should notice a smaller file size if you have a lot of code in the db.

This posting might also help... Export All Database Objects Into Text Files

HTH
 

TimW

Registered User.
Local time
Today, 09:54
Joined
Feb 6, 2007
Messages
90
I know this is an old thread - but i have a solution!!
Private Sub Form_Load()
Me.AllowAdditions = True
End Sub
The uses VBA to set the allowadditions tag and overrides the forms properties (That decides to change itself depending on who is running the App or corrupted form etc) this solution seems to work for me
 

missinglinq

AWF VIP
Local time
Today, 04:54
Joined
Jun 20, 2003
Messages
6,420
Sorry, Tim, but the form in question already had AllowAdditions set to Yes. The problem was corruption, as proved by its resolution by simply moving everything into a new, blank form. Setting AllowAdditons to Yes a second time, in code, won't fix corruption.
 

TimW

Registered User.
Local time
Today, 09:54
Joined
Feb 6, 2007
Messages
90
Thanks for the feedback,
For my situation (users having their own copy of the front end of the db) most allowed data entry and sometimes others did not (using the same form). Comparing the properties for the good and failed forms; the allow additions property on the form that had a blank screen had changed its self over from true to false. Using the VBA to explictly change this worked in this case. I tested this by changing the property to false manually and the vba would override this.
And i have to agree that copying the code over to a new form does get rid of the corruption. But my solution worked for my instance of a blank form. :)
 
Last edited:

Users who are viewing this thread

Top Bottom