Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Control tab displaying other tab's controls and subforms

Status
Not open for further replies.

CloudRise

MIS
Aug 30, 2003
2
US
I have a tab control on a form with several tabs each of which displays either controls, subforms or both. For subforms in the tabs the control source is changed by the change event so that only the subforms of the current tab are bound. After changing tabs at times the current tab displays parts of the subforms of a different tab in areas not occupied by the controls of the current tab. The "leaking" subform can actually be edited - as if it is still active.

Closing the form after this causes a GP.

Any ideas ??? [nosmiley]

 
Resources!

The "leaking" is because your PC has run out of resources. The general protection fault confirms the issue.

- Video memory. Insufficient memory will cause display problems, usually blank screens or icons with a black image
- Memory (RAM). When you run out of RAM, your computer will start to use your hard drive as "virtual memory". This will really slow things down since writing and reading from the hard drive is very slow compared to referencing active memory.
- Disk space. You need enough space in your TEMP files to handle the workspace used by Access. If you run out of disk space, your computer will really struggle looking for space to store TEMP work, and will end up spending all it's time "thrashing", looking for free space instead of resolving the instruction set.

So switch from tab form to tab subform and back and forth and crash.

For subforms in the tabs the control source is changed by the change event so that only the subforms of the current tab are bound.

Well, this approach is probably more kind on network traffic but harder on CPU usuage - requery, and requery.

But the other issue is if you are using RecordSets with ADO or DAO code are your freeing up resources afterward?

Code:
Dim dbs as DAO.Database, rst as DAO.RecordSet
'...
'Set dbs = CurrentDB()
'Set rst = dbs.OpenRecordSet(strSQL)
'...
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing

If you do not close these types of objects, you may erode your available memory every time you open a new recordset without closing the other.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top