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

Form not opening completely

204 128KB
I now have a very tricky problem. I have a form in my Access application which sometimes - perhaps once every 5 to 10 times, though it is not consistent - does not open completely. Specifically, when opened it displays the header section and a skeletal version of the footer section (i.e. text boxes but no data), but the detail section is completely blank. As far as I know this is the only one of the 70+ forms and subforms in the application which behaves in this way.

The form is normally opened by the statement DoCmd.OpenForm strArgument, acNormal, , , acFormAdd in a switchboard event procedure. In the form's property sheet the default view on opening is Single Form, and Allow Form View is set.
Debug.Print statements in the various event procedures of the form opening sequence (Open - Load - Resize - Activate - Current) (which contain no other code than the debug.print statements) show that when the form opens incompletely the Open, Load, Resize and Activate events occur, but not the Current event. After the Activate event the form is displayed with a blank Detail section.

Compact and Repair, Decompile and recompile don't help. It's doesn't appear to be data-related because I have had it occur with three different users' back end data files.

Sounds like either a tricky hardware problem or a timing issue, right? But it's not hardware, because it has occurred repeatedly on two different computers (mine and the user's) in different locations running different compiled and uncompiled versions of the DBMS. I have also caused long pauses in each of the above-mentioned event procedures (by inserting MsgBox statements there), and it didn't make any difference. Neither did Google turn up anything helpful.

I don't expect anybody to be able to solve this with such scanty information, but can anyone suggest any further way I might be able to tackle the problem or get further information? Or has anyone seen any similar behaviour?
Dec 31 '21 #1

✓ answered by NeoPa

Hi again Petrol.

This sounds very much like it may be that hardest of problems to diagnose - a corruption.

If it's not too difficult then re-create it from scratch. If it really is then try saving it to a text file and reloading it. Here's an example of what that might look like :
Expand|Select|Wrap|Line Numbers
  1. Call SaveAsText(acForm, "MyFormName", "C:\TempFolder\FormName.Txt")
  2. Call LoadFromText(acForm, "MyFormName", "C:\TempFolder\FormName.Txt")

6 9655
NeoPa
32,556 Expert Mod 16PB
Hi again Petrol.

This sounds very much like it may be that hardest of problems to diagnose - a corruption.

If it's not too difficult then re-create it from scratch. If it really is then try saving it to a text file and reloading it. Here's an example of what that might look like :
Expand|Select|Wrap|Line Numbers
  1. Call SaveAsText(acForm, "MyFormName", "C:\TempFolder\FormName.Txt")
  2. Call LoadFromText(acForm, "MyFormName", "C:\TempFolder\FormName.Txt")
Dec 31 '21 #2
Petrol
204 128KB
Hmm, yes. I suspected I might have to recreate the form. I guess I can simply copy the controls one by one from the existing form to a new one.
Thank you again, Ade.
Dec 31 '21 #3
NeoPa
32,556 Expert Mod 16PB
Do them one at a time and check that it still works between each.

Alternatively, the SaveAsText() & LoadFromText() approach may be quicker & should work. Worth a try first before going through the far more long-winded approach ;-)
Dec 31 '21 #4
jimatqsi
1,271 Expert 1GB
What is the record source? Are you sure there is data available when this is happening? It sounds to me like the form is fine but there are no records found in the recordsource. Is the form sensitive to the status of the data such that the timing of events may present you with moments when there is no data present?
Dec 31 '21 #5
Petrol
204 128KB
Thanks, Jim, no, the record source is good and stable - it is the main members list and has thousands of entries - and in any case the form is opened to add new members. It opens correctly most times but only partially now and then, so I think that as NeoPa implies it's just one of those funny little Access glitches. I'll rebuild the form as NeoPa suggests, but thanks for your suggestions too.
I must admit I hadn't thought of doing it through SaveAsText() and LoadFromText().
Dec 31 '21 #6
NeoPa
32,556 Expert Mod 16PB
That was just something another MVP came up with very recently for someone else so I suggested it here. It seems a quicker way of recreating just the fundamentals of such an object. Glad to hear it worked for you :-)
Dec 31 '21 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: RC | last post by:
1) Open Visual Studio .Net 2003 2) Create new project Visual C # (Windows application) 3) Close Visual Studio .Net 2003 4) Compile from command line "devenv.exe /rebuild Debug /project Sample...
4
by: MS | last post by:
Just a general question here re VBA. Can anyone explain the differences between "!" and "." when refering to a control? eg Me!TxtBox and Me.TxtBox. What is difference between "+" and "&"...
8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
1
by: kevcar40 | last post by:
hi is it possible to stop a form opening if the result of the query is null? eg select a company name from a combobox if the name is not in the table (ie the query returns null) can i stop...
4
by: garyusenet | last post by:
I have a login form, which i have made by simply modifying the standard wizard created form from Visual C# express - when I chose a windows application. I have two buttons on my login form. ...
2
by: str1ker | last post by:
Hi, I'm sorry that this question is really noobish, but I've looked in the help file, I've just tried using help from the intelisense, but I have no idea as to how I can open another form. In...
4
Presto731
by: Presto731 | last post by:
I have a paremeter query set up that asks you to enter a value to open it. I want the form attached to that query to ask for the same info when you open it. It does that when you click on the form...
22
by: questionit | last post by:
I am trying to open Sub Form using the command below, but i am getting error. Please confirm if i can open sub form using this command: Call DoCmd.OpenForm("Forms!!", acNormal, , , ,...
1
by: jimatqsi | last post by:
I'm modifying an existing system, working in Access 2003. I recently made a new form with a couple of labels and check boxes. It opens when I click a button on the sales order entry screen. It has...
6
by: ganeshvkl | last post by:
hi, My project is VB.net with Sql server 2000. i store image in database now the database size is around 400 MB. when i Click the form (image i have stored & Retrieved), it takes around 3...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.