Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-13-2017, 02:59 AM   #1
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Emulated split form problem

Hi all,
I have started to use the emulated split form where possible in my databases.
The way it works is shown in this thread.

https://www.access-programmers.co.uk...d.php?t=294421

I have a few problems with it, that I can live with for now.
1. I am unable to select a different record some times until I use the record selector as opposed to just selecting a control.
2. When going to form view from design view I get error 2455 on the line shown in 2455-2 pic. If I End and try again it works fine, and does so for the most part. Obviously when running the user will not have design mode, but I would still like to know what my mistake is.

However I have just discovered that if I try and edit a record in the emulated splitform, I get the message in Emulated Splitform pic.

I tried the same on Ridders latest sample db with this with the same result.?
I would like to be able to use the datasheet as a normal datasheet if at all possible, just for ease of update on most occassions.

Is anyone able to offer ideas on how to achieve this please.?

TIA
Attached Images
File Type: png Emulated Split Form.PNG (8.2 KB, 22 views)
File Type: png 2455.PNG (36.8 KB, 21 views)
File Type: png 2455-2.PNG (10.3 KB, 18 views)

__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-13-2017, 03:24 AM   #2
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 1,931
Thanks: 35
Thanked 448 Times in 417 Posts
ridders will become famous soon enough ridders will become famous soon enough
Re: Emulated split form problem

I've just checked the most recent version (v3) that I posted to the forum on 6 Aug

None of the issues you reported occurred for me (Access 2010 32-bit)

If you want to upload your problem split form, i'll have a look at it
__________________
Colin
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.
, Tapatalk


If this answer has helped, please click the Thanks button and/or click the 'reputation' scales symbol on the left and leave a comment. Cheers!

Last edited by ridders; 09-13-2017 at 03:31 AM. Reason: Checked file
ridders is offline   Reply With Quote
Old 09-13-2017, 05:46 AM   #3
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

Hi Colin,

I have your DB V3 as well.
Are you saying that you can edit any of the controls in the subform with 2010?
I only have 2007.

Quote:
Originally Posted by ridders View Post
I've just checked the most recent version (v3) that I posted to the forum on 6 Aug

None of the issues you reported occurred for me (Access 2010 32-bit)

If you want to upload your problem split form, i'll have a look at it

__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-13-2017, 06:19 AM   #4
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 1,931
Thanks: 35
Thanked 448 Times in 417 Posts
ridders will become famous soon enough ridders will become famous soon enough
Re: Emulated split form problem

Yes ... IN THE TOP HALF of the form

You're right about the CancelUpdate error when trying to edit a record in the continuous form section. Not sure whether its solvable

I realise you can edit both halves in the 'proper' split form but as you know that has lots of issues

I THINK the issue is caused by the fact that the 2 halves of the form are deliberately not linked with master/child fields. That's necessary to ensure all records appear in the continuous section.

A recordset is used to display the data in the main form which means you can't edit the subform

I tried changing it to recordset.clone - it then allows editing in the subform but its not updated in the top half.

I then tried requerying the main form but that gives a new error

As I never use split forms ... including my own emulated version ... I'm going to leave it for now

HTH
__________________
Colin
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.
, Tapatalk


If this answer has helped, please click the Thanks button and/or click the 'reputation' scales symbol on the left and leave a comment. Cheers!
ridders is offline   Reply With Quote
Old 09-13-2017, 07:04 AM   #5
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

Thank you Colin,

At least I am not going mad :-)
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-13-2017, 09:38 AM   #6
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

I've just tried the form in my SSAFA database at home that is based on this logic, and whilst I still cannot edit any data in the subform, I do not get the error. ?
As the subform is really only used in this DB for selecting, that is not an issue.
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-13-2017, 12:00 PM   #7
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 1,931
Thanks: 35
Thanked 448 Times in 417 Posts
ridders will become famous soon enough ridders will become famous soon enough
Re: Emulated split form problem

What's SSAFA?

__________________
Colin
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.
, Tapatalk


If this answer has helped, please click the Thanks button and/or click the 'reputation' scales symbol on the left and leave a comment. Cheers!
ridders is offline   Reply With Quote
Old 09-13-2017, 11:36 PM   #8
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

Quote:
Originally Posted by ridders View Post
What's SSAFA?
SSAFA - Soldiers, Sailors, Airmen And Families Association

It is a charity I volunteer with. I use the database for notifying caseworkers of deposits and receipts for clients. Nothing fancy, just makes my life a lot eaiser.

https://www.ssafa.org.uk/

https://en.wikipedia.org/wiki/SSAFA
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-14-2017, 03:45 AM   #9
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

Colin,
I was getting that 'stuck on a record' in the subform again this morning.
I amended your DB to make it a datasheet (as are mine) and can replicate the problem.?

If you have any time, would you be able to give it a look please.?

It doesn't happen all the time, so you will need to pretty much click in the subform randomly until it does. Should not take long.
To get past it then select the record selector. Even the vcr buttons on the bottom do not work.

TIA
Attached Files
File Type: accdb EmulateSplitForm v3.accdb (616.0 KB, 14 views)
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-14-2017, 04:32 AM   #10
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 10,707
Thanks: 34
Thanked 1,703 Times in 1,655 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Emulated split form problem

?? I downloaded the sample.
If I edit any field in the top half, move the record selector forward, then back, the edit shows in both top and bottom.

I do get the error below when attempting to edit in the bottom half.

Update or CancelUpdate without addNew or Edit
__________________

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.

Last edited by jdraw; 09-14-2017 at 04:39 AM.
jdraw is offline   Reply With Quote
Old 09-14-2017, 05:09 AM   #11
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 4,187
Thanks: 80
Thanked 1,141 Times in 1,117 Posts
Minty will become famous soon enough Minty will become famous soon enough
Re: Emulated split form problem

I'm guessing it's because you have the same recordset effectively open twice, and one has to take precedence over the other.
__________________
A little thanks goes a long way
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

(Please use the scales on the left if we have helped!) Mark threads as Solved once you have an answer.

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.
Minty is offline   Reply With Quote
Old 09-14-2017, 05:32 AM   #12
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 10,707
Thanks: 34
Thanked 1,703 Times in 1,655 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Emulated split form problem

Minty,
I agree that's why I moved off the record to "save the edit" and back to re-establish the sync in the 2 forms.

My thinking is there may be a way to include a button with a click event to do the movements and effect the edits.
__________________

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.
jdraw is offline   Reply With Quote
Old 09-14-2017, 09:38 AM   #13
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,378
Thanks: 171
Thanked 198 Times in 184 Posts
Gasman will become famous soon enough
Re: Emulated split form problem

I could not get it to stick on a record with Colin's DB when it was a continuous form though.
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 09-14-2017, 11:52 AM   #14
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 1,931
Thanks: 35
Thanked 448 Times in 417 Posts
ridders will become famous soon enough ridders will become famous soon enough
Re: Emulated split form problem

Hi all

I've had another look at this and made some changes in the light of recent comments
There are 2 versions attached:

Version 4
a) the subform is now a datasheet rather than a continuous form

b) after editing a field in the top half it automatically does the following using an UpdateChanges procedure
- turns off screen updating
- moves to the next record
- moves back to the previous record
- moves to the next field
- turns on screen updating
Result: Both halves of the form update synchronously

c) I did exactly the same to the lower half and it can SOMETIMES be edited without the 'Update or CancelUpdate without addNew or Edit' error
For anyone who cares this is error 3020

The error is due to the way the recordset has been used in this emulated form.
I haven't been able to isolate it effectively but perhaps someone else will see how to do it.

This link may be of interest/use:
https://stackoverflow.com/questions/...ng-find-dialog

In my view this is too unreliable for use as it stands so ...

Version 5
Exactly the same as version 4 but I've LOCKED the subform
That 'fixed' it ...

I've not removed the code from the subform though it is redundant in this version

======================

Anyway, could others please test both versions and see what they think
Please feel free to improve on it - I won't be offended!

I'm going to 'blame' Mark K for coming up with this form in the first place!

No I'm not really ...
However, I have sent him a PM so he is aware of the issues and may perhaps come up with a solution
Attached Files
File Type: accdb EmulateSplitForm v4.accdb (564.0 KB, 9 views)
File Type: accdb EmulateSplitForm v5.accdb (536.0 KB, 12 views)
File Type: txt VersionInfo.txt (736 Bytes, 8 views)
__________________
Colin
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.
, Tapatalk


If this answer has helped, please click the Thanks button and/or click the 'reputation' scales symbol on the left and leave a comment. Cheers!
ridders is offline   Reply With Quote
Old 09-14-2017, 12:18 PM   #15
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 10,707
Thanks: 34
Thanked 1,703 Times in 1,655 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Emulated split form problem

I like the v5 UpdateChanges.
That is exactly the intent I suggested in my response to Minty in post #12.
Colin has done it on the afterUpdate and locked the subform. Great stuff.

__________________

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.
jdraw 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
Problem on Split DB Eljefegeneo General 1 02-10-2015 03:14 PM
Split form event processing problem apeters Forms 1 08-09-2011 10:58 PM
SPLIT problem chris-uk-lad Modules & VBA 5 09-24-2008 05:51 AM
Split app problem BobNTN General 16 09-03-2008 02:20 PM
A problem after Split bigshotjeev Forms 4 09-09-2007 06:53 AM




All times are GMT -8. The time now is 11:53 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 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World