Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-09-2018, 03:28 AM   #106
Uncle Gizmo
Nifty Access Guy
 
Uncle Gizmo's Avatar
 
Join Date: Jul 2003
Location: Newbury Berks UK
Posts: 9,500
Thanks: 360
Thanked 779 Times in 744 Posts
Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough
Send a message via Skype™ to Uncle Gizmo
Re: A Little Help With Tab Control

Some Errors are very hard to track down. I recall deploying a runtime version of MS Access on a Citrix system with an MS SQL back end. It worked fine on my own PC but just would not work properly on the clients system, it just kept crashing... The problem with runtime is it doesn't tell you anything! I had to go through every single code block and make sure it had error code, if it didn't, add it. It was a nightmare.

Now I routinely use the text insert ability of MS Access to place a code function stub in my code with all the error code already in it. Very seldom do I write code stubs without error handling. Once bitten twice shy!

If this problem does niggle at you and you decide to tackle it to find out what's going wrong, one thing I find very effective is to create a brand new blank database, but "NO" don't import anything from the old database, not objects, not forms, nothing like that. Tables are probably ok! (As in - famous last words) --

In this new database, create very simple versions of the forms from your original database, just a bare minimum of controls to test the functionality.. Now copy and paste the text version of the code, subroutines, functions and things from the original database. Obviously this is not something you would want to do often, so try compiling and decompiling repairing and everything else you can think of first!

__________________
Code:
                 |||||
               @(~^~)@
-------------oOo---U---oOo-------------
|                                     |
|      Uncle Gizmo              |
|                                     |
|                                     |
| Get $20 worth of "Nifty Code"       |
|      
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| | Ooo | |_________________ooO____( )________| ( ) ) / \ ( (_/ \_)
Uncle Gizmo is offline   Reply With Quote
The Following User Says Thank You to Uncle Gizmo For This Useful Post:
Gasman (09-09-2018)
Old 09-09-2018, 04:17 AM   #107
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 32,032
Thanks: 10
Thanked 3,862 Times in 3,805 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: A Little Help With Tab Control

Quote:
Originally Posted by Uncle Gizmo View Post
Now I routinely use the text insert ability of MS Access to place a code function stub in my code with all the error code already in it.
I love MZ Tools for the ability to add customizable error handling to a sub and code templates. They are all a right-click away while coding.
__________________
Paul
Microsoft Access MVP

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is online now   Reply With Quote
Old 09-11-2018, 09:03 AM   #108
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 351
Thanks: 167
Thanked 7 Times in 4 Posts
psyc0tic1 is on a distinguished road
Re: A Little Help With Tab Control

Quote:
Originally Posted by pbaldy View Post
I removed the source object for the first tab and this code works:

Code:
        Case "NewRecordInputForm"
            Me.Patrick_Input_Form.SourceObject = "frm_engineerinput"
You'd have to do the same thing for the other tabs.
I tried this first and yes it did work but has not sped up the loading time of the database.

__________________
Richard
Access 2013, Windows 7 64 bit
psyc0tic1 is online now   Reply With Quote
Old 09-11-2018, 09:09 AM   #109
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 351
Thanks: 167
Thanked 7 Times in 4 Posts
psyc0tic1 is on a distinguished road
Re: A Little Help With Tab Control

Quote:
Originally Posted by MarkK View Post
Here's the single subform control idea implemented. Tab_Change() event swaps out the subforms. Looks like a tab control, smells like a tab control, but there is nothing on any of the pages.
Hope this helps. If not, just ignore it.
Mark
I tried this method next and this is pretty cool but alas... this has not sped up the loading time... well... it sped up the time it takes the database to load after logging in but it has lengthened the time it takes each form to open after that... 3 or 4 times longer than before.

At the same time the forms functionality slowed down... like when entering data... after you type the first character everything freezes for 5-10 seconds.
__________________
Richard
Access 2013, Windows 7 64 bit
psyc0tic1 is online now   Reply With Quote
Old 09-11-2018, 12:05 PM   #110
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 351
Thanks: 167
Thanked 7 Times in 4 Posts
psyc0tic1 is on a distinguished road
Re: A Little Help With Tab Control

Quote:
Originally Posted by Gasman View Post
No Mark, I was not even trying to log in. I opened it with the shift key and looked at some code to see what the form was called.

Logging in, it balks at ptrsafe in ModHideClose and I'm on 32 bit windows.

Thank you.

@Ridders I can open every form in design view except frm_home.
Seems it was 64 bit code?
Gasman,

If you comment out the HideAccessCloseButton on the second line of the code behind frm_home it will stop doing that to you when you open it. The mod_HideClose module should be the only one in the db that has ptrsafe code in it.

If I knew what to put in... it can be made to work with both.
__________________
Richard
Access 2013, Windows 7 64 bit
psyc0tic1 is online now   Reply With Quote
Old 09-11-2018, 12:31 PM   #111
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 2,574
Thanks: 307
Thanked 401 Times in 386 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: A Little Help With Tab Control

That is the problem, I cannot open that form, that is the only form I cannot open, even in design mode.

Don't worry about it, I know how it should be done now, which is all I was looking for.

Quote:
Originally Posted by psyc0tic1 View Post
Gasman,

If you comment out the HideAccessCloseButton on the second line of the code behind frm_home it will stop doing that to you when you open it. The mod_HideClose module should be the only one in the db that has ptrsafe code in it.

If I knew what to put in... it can be made to work with both.
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-11-2018, 12:54 PM   #112
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 1,590
Thanks: 335
Thanked 203 Times in 179 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: A Little Help With Tab Control

I had to read this post in it’s entirety...needed to find out WHY a somewhat simple subject required 110 posts with some of the best that AWF has to offer involved!

__________________
I had the RIGHT to remain silent...but I didnt have the ABILITY. - Ron White
NauticalGent is offline   Reply With Quote
Old 09-11-2018, 12:57 PM   #113
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 2,574
Thanks: 307
Thanked 401 Times in 386 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: A Little Help With Tab Control

Quote:
Originally Posted by NauticalGent View Post
I had to read this post in its entirety...needed to find out WHY a somewhat simple subject required 110 posts with some of the best that AWF has to offer involved!
Sorry, I muddied the waters somewhat.
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-11-2018, 12:59 PM   #114
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 1,590
Thanks: 335
Thanked 203 Times in 179 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: A Little Help With Tab Control

Somebody’s got to do it! And, there were some cool things to learn too...
__________________
I had the RIGHT to remain silent...but I didnt have the ABILITY. - Ron White
NauticalGent is offline   Reply With Quote
Old 09-12-2018, 05:24 AM   #115
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 351
Thanks: 167
Thanked 7 Times in 4 Posts
psyc0tic1 is on a distinguished road
Re: A Little Help With Tab Control

Quote:
Originally Posted by Gasman View Post
That is the problem, I cannot open that form, that is the only form I cannot open, even in design mode.

Don't worry about it, I know how it should be done now, which is all I was looking for.
Yea... when that happens... holding down the SHIFT key and clicking on the db will open it with no code running... then ALT+F11 will bring up the code window so the line can be commented out. I'm sure this isn't news to you though... you guys are great.
__________________
Richard
Access 2013, Windows 7 64 bit
psyc0tic1 is online now   Reply With Quote
Old 09-12-2018, 05:25 AM   #116
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 351
Thanks: 167
Thanked 7 Times in 4 Posts
psyc0tic1 is on a distinguished road
Re: A Little Help With Tab Control

Quote:
Originally Posted by NauticalGent View Post
I had to read this post in its entirety...needed to find out WHY a somewhat simple subject required 110 posts with some of the best that AWF has to offer involved!
Mostly my fault.

The thread started out in one direction and once some areas were figured out... I went deeper into other directions.

Probably should have started new threads for the different issues.
__________________
Richard
Access 2013, Windows 7 64 bit
psyc0tic1 is online now   Reply With Quote
Old 09-12-2018, 07:50 AM   #117
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 1,590
Thanks: 335
Thanked 203 Times in 179 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: A Little Help With Tab Control

To be clear, there was absolutely NO stone-thowing on my part. And threads tend to take a few turns here and there...there were at least three Mods involved so it there was a need for a new one, one of them would have sorted it out.

Glad you were able to get answers to some of your questions...
__________________
I had the RIGHT to remain silent...but I didnt have the ABILITY. - Ron White
NauticalGent is offline   Reply With Quote
Old 10-01-2018, 06:04 AM   #118
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,860
Thanks: 92
Thanked 1,689 Times in 1,568 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: A Little Help With Tab Control

@MarkK
This is a further thank you for the idea you suggested back in post 89 of this thread

I tried to add some well deserved RPs to you but it says I need to spread them around some more before I can give you any more!

Its taken me nearly a month to get around to it but I've now implemented the idea as part of an updated version of my JSON Analyse & Transform app.

The basic idea is:
a) JSON files are imported, analysed into the component parts & transformed creating one or more linked tables 'on the fly'
b) To view the data, a form is automatically created in datasheet view (using a template form) for each table .... with subforms added as appropriate where there are linked tables. This creates a series of subdatasheets so all the data can easily be made visible.
The top level form is then used as the source object for an empty subform (this was the idea I was stuck on until I nicked it from you)

So using a relatively simple example, we start by importing something like this:



then analyse it:



then using a transform function to populate the tables created, we can view the data using linked subforms like this:



I realise this approach disobeys loads of recommended Access procedures by creating tables & forms 'on demand' but its exactly what is needed for this unusual Access app which is intended solely for developers

I will explain the idea in more detail in a separate thread in the next day or so
Thanks again
Attached Images
File Type: png JSONImport.PNG (66.6 KB, 22 views)
File Type: png JSONAnalyse.PNG (37.4 KB, 22 views)
File Type: png JSONOutput2.PNG (51.0 KB, 21 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Anchoring - Control to Control? (2007) stevenblanc Forms 3 07-21-2011 04:09 AM
Stuck: Searching Controls for a specific control name and changing the control value YevS Modules & VBA 2 07-09-2009 01:10 AM
Make one control's selection determin how another control is populated Paul-ish Forms 1 08-15-2007 06:45 PM
[SOLVED] Error: The control or subform control is too large for this location jsprenk Forms 0 07-11-2006 10:01 AM
"Can't Reference a control's Property or Method Unless The Control Has the Focus Dugantrain Forms 4 01-16-2003 12:30 PM




All times are GMT -8. The time now is 11:28 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World