Emulated split form problem (1 Viewer)

NauticalGent

Ignore List Poster Boy
Local time
Today, 05:04
Joined
Apr 27, 2015
Messages
6,286
... I NEVER use split forms nor do I use 'my' emulated version.

Unfortunately, I do not get that choice. My users simply LOVE the split form look and functionality and I have been patiently waiting for your "eureka" moment regarding this.

Now...quit playing around and get this done!:cool:

Seriously though, I like the way it looks and have even used the original version as a prototype but held off deployment until somebody said "wow!". Really appreciate your diligence on this and looking forward to the final product.
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
As ever, beautifully put and to the point! :D:)

Come on in and get your feet wet.
As far as I'm concerned 7A is the final version if you want a datasheet.
Or 7 if you want a continuous form ....

Now which was the original version again....?
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:04
Joined
Sep 21, 2011
Messages
14,050
I don't know if this would help with the sort option, but on a form of mine I have an ESF form and it works great. I decided to add a search function for a filter to the main form, that worked great as well, but broke the ESF. I tried setting the filter of that form to match the main form, but had problems.

However I found that if I just set the recordset again, everything worked beautifully?

Code:
Private Sub cmdSearch_Click()
Me.Filter = "[Surname] like '*" & Me.txtSearch & "*'"
Me.FilterOn = True
Set Me.sfrmClient.Form.Recordset = Me.Recordset

End Sub
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
Well done Gasman & Nautical Gent.
Working together as a team you've managed to get me to look at this once more!

I've taken my version 7 with a continuous subform and made the following changes:
1. Click on any subform column header to sort by that column
Click again to reverse sort by that column
2. Added a filter combo box (in this case to filter by ClassID
3. Replaced the Access navigation controls with my own - i did this as I needed to get rid of the Access search box at the bottom of the subform as it was causing conflicts)
4. Added code to sync the main form with the subform after changing the column sort order



AND for me anyway ... there are absolutely no errors.
Nothing at all went wrong in my testing. Honestly!
Over to you to rip it to shreds & find issues that I didn't :rolleyes:

Overall, I'm VERY happy with the attached - version 8 & hopefully FINAL.
After all this effort, I hate split forms with a vengeance now. :p:D;)

Maybe I could do an nfk and put that in BIG LETTERS at the bottom of each post...
Thoughts on a postcard please

EDIT 29/09/2017:
There is a bug in version 8 as spotted by Minty in post#46.
Fixed as version 9 in post #49
 

Attachments

  • EmulateSplitForm v8.accdb
    700 KB · Views: 178
  • Capture.PNG
    Capture.PNG
    30.4 KB · Views: 344
Last edited:

NauticalGent

Ignore List Poster Boy
Local time
Today, 05:04
Joined
Apr 27, 2015
Messages
6,286
Nicely done Col! That click-n-sort feature is a great touch, one my users will love and I will take FULL credit for...after all, programming is one of the few professions that encourages plagiarism.The only mod I will add will be a combo box search feature for select columns in the subform. My users just have a hard time with the built-in search functionality that comes with the split-form. Again, well done. If I had an address, I could send you a Command Coin for your efforts...
 

Minty

AWF VIP
Local time
Today, 09:04
Joined
Jul 26, 2013
Messages
10,355
I'm sorry to report that there is a serious bug Colin.
The last record selectors code has got up, morphed into something from another time and space, and decided that working is a thing of the past.
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
Doh!
How did I let that slip through?
I DMaxed a text value...
Will fix later

BTW Minty are you still in spaceship land? Captain Small's influence is extending into other threads with silly string.
And for anyone reading that who thinks I've lost my mind, you're probably right but hopefully minty will understand
 

Minty

AWF VIP
Local time
Today, 09:04
Joined
Jul 26, 2013
Messages
10,355
BTW Minty are you still in spaceship land? Captain Small's influence is extending into other threads with silly string.
And for anyone reading that who thinks I've lost my mind, you're probably right but hopefully minty will understand

I would actually quite like to stay out in space, but I think I have been "landed" with a couple of planet earth work projects that will be occupying my time quite significantly in the near future.

Or was that A long long time ago...
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
I'm pleased to announce that the code for the last record has been whipped back into behaving itself. Version 9 attached!

Thanks for letting me know Minty
I've added a comment to the earlier post as well
 

Attachments

  • EmulateSplitForm v9.accdb
    700 KB · Views: 160
  • VersionInfo.txt
    1.3 KB · Views: 143

Gasman

Enthusiastic Amateur
Local time
Today, 09:04
Joined
Sep 21, 2011
Messages
14,050
Just tried V9 as I fancied the sort option, yet when I click on a header I get the following just after it appears to sort?

Sorry Colin :(
 

Attachments

  • esf error.PNG
    esf error.PNG
    18.7 KB · Views: 174

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
hi gasman

Just downloaded my version 9 to my tablet and retested it in A2010.
It does what it should and not what your screenshot shows.
Perhaps an A2007 thing again?

I did see exactly that effect when I started working on the previous version.
I assumed it was corruption and binned it.

Are you able to re-test in A2010 or later as I don't have A2007
Failing that, try the following in A2007
1. Check the VBA references are ok
2. Decompile, recompile then compact.
 
Last edited:

Minty

AWF VIP
Local time
Today, 09:04
Joined
Jul 26, 2013
Messages
10,355
Hi all - I can report it's all working fine on my 2010 version here.
 

static

Registered User.
Local time
Today, 09:04
Joined
Nov 2, 2015
Messages
823
I had a few issues. (2010)

- If I click continuously (quickly) on the next record I get error 2105 : you can't go to the specified record. (same on back)
- If I edit a record in the single view and click on the continuous view it selects a random record.
- Can only sort by one field.
- Clicking check boxes in continuous has no effect. Need to double click.
- Changing 07BN/Ge to 07BN/Fr generates varios errors:
update or cancelupdate without addnew or edit (happens 4 times. once it froze Access.)
- Clicking sort on single form doesn't affect bottom form. Then, clicking into subform doesn't display selected record.
 

static

Registered User.
Local time
Today, 09:04
Joined
Nov 2, 2015
Messages
823
And I think while ever you are trying to work with 2 instances of the same recordset you will always have these problems.

If you build the continuous form and then put the single form controls in the header/footer you'd only have one form and one recordset.

Or make the single form the sub and bind it.
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
Hi

Thanks to you both
Just worked through the issues static has reported - see comments below

- If I click continuously (quickly) on the next record I get error 2105 : you can't go to the specified record. (same on back)
Yes, I get that as well.
I also get the same issue in other databases where I've added my own navigation controls.
Adding the line below 'fixes' that issue
Code:
If err=2105 Then Resume Next
It still needs error handling added to each procedure but I was leaving that till the crack team of bug testers had reported back

- If I edit a record in the single view and click on the continuous view it selects a random record.
It doesn't do that for me

- Can only sort by one field.
That's also true if you use datasheet view

- Clicking check boxes in continuous has no effect. Need to double click.
True - I thought that might be because there is a yellow box behind the checkbox to simulate highlghting.
However I tried removing the box & it still needs a double click
I also trued using the checkbox click event instead of the after update event but it doesn't help.
It appears that the first click selects the item before the second click changes the state.
Offhand I've no idea why this is so
Could try changing to a Yes/No combo box but I'd rather not do so.

- Changing 07BN/Ge to 07BN/Fr generates varios errors:
update or cancelupdate without addnew or edit (happens 4 times. once it froze Access.)

The ClassID is the PK field and you are trying to enter a duplicated value.
Due to the convoluted way the recordsets are kept in sync, it takes a while to work it out before erroring
Ideas for fixing?

- Clicking sort on single form doesn't affect bottom form. Then, clicking into subform doesn't display selected record.
How can you sort on a single record in the single form?
Doesn't make sense to me

EDIT - posts crossed so in answer to the latest reply
Having 2 instances of the same recordset is fundamental to getting this to work
It does indeed cause issues - look back to v5

The continuous form is already in the footer of the main form!

Thanks for feedback.
 
Last edited:

static

Registered User.
Local time
Today, 09:04
Joined
Nov 2, 2015
Messages
823
How can you sort on a single record in the single form?
Doesn't make sense to me

EDIT - posts crossed so in answer to the latest reply
Having 2 instances of the same recordset is fundamental to getting this to work
It does indeed cause issues - look back to v5

1) By clicking sort in the menu.
2) This uses one form, one recordset. View attachment EmulateSplitForm v8.accdb
 

isladogs

MVP / VIP
Local time
Today, 09:04
Joined
Jan 14, 2017
Messages
18,186
1) By clicking sort in the menu.
2) This uses one form, one recordset.

1. Sorry - don't understand
2. I assume this is different to the last version 8 you posted

OK - I hpe I'm not sounding picky here but there are a few issues with yours as well

a) Sometimes (not always when it first opens, the header section shows as a solid blue rectangle with no controls.
I have to click in that section before the single form appears.

b) The Exit button code is detached from the button or missing?
c) I can't view the code - you've locked it somehow
d) The yellow record highlighter is missing
e) You can't sort by column on the form - nor could I do so using the menu

However on the plus side the checkbox behaves properly!

If you'd like to 'deal with' the above I'd be happy to check it out again :D:)
 

static

Registered User.
Local time
Today, 09:04
Joined
Nov 2, 2015
Messages
823
:)

1) Home Ascending / Descending. It's there whatever type of form you are using. No?
2) I have no idea! It's only using the table and controls should make no difference.

I like picky. It means you care. That's quite rare.

a) Yeah I had that a first. doesn't seem to do it now. ? This is standard form so ... if it has issues it's Access's problem not mine.

b) + c) Nothing locked. I deleted the module. This doesn't require code. see a

d) I don't know how you did that. Everything was highlighted so I recreated the controls.

e) see a/b +1. no module. You should be able to sort from the menu.

Basically, whatever you did to highlight the records and sort by field needs to be added again.
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 09:04
Joined
Sep 21, 2011
Messages
14,050
Hi all - I can report it's all working fine on my 2010 version here.

Yes, I got someone else to try it with 2007 and it did the same.
She is going to try it on 2016 at home and report back.

I really only want to use it for viewing and a quick selection, well at present that is the requirement, and it works great for that.
 

Users who are viewing this thread

Top Bottom