• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Split Forms: Just. Say. NO! (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 14:33
Joined
Sep 21, 2011
Messages
6,818
Just so anyone else is aware, 2007 errors with 'Cannot find file 'Flter'" on
Code:
cmd.Picture = "Filter"

1585924872208.png

I seem to recall later versions have these built in.?
Easily fixed if needed though.

Thank you MajP
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 10:33
Joined
May 21, 2018
Messages
3,489
I seem to recall later versions have these built in.?
Easily fixed if needed though
That is the only trick. You save the picture to the image gallery by making it a shared image. Also you make the image type "Shared". This is a little bit of a PIA, and the only hard part of doing this. This allows you to simply call the image by name.

imagegallery.jpg
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:33
Joined
Sep 21, 2011
Messages
6,818
I do not think 2007 has an image gallery?, at least I cannot find it, but would use an actual file path instead.?
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 10:33
Joined
Apr 27, 2015
Messages
3,015
Hi. Would you mind posting a demo of your split form with the broken BeforeUpdate event, so I can learn from it? Thanks.
I will work on posting a scaled down version when I get back to the office. Getting around on the weekends can be a little tricky because the Carabinieri are out there in force.

In the meantime, here is Gina's code that I adapted.
 

zeroaccess

Active member
Local time
Today, 09:33
Joined
Jan 30, 2020
Messages
607
Well this noob is using split forms with success, though I will admit there are things I can't seem to do, such as referring to a specific record # in the datasheet. There are probably other things I haven't run into.

I don't like how a split form datasheet will force your entire form window's dimensions to the max and there is no way to control it. If that is a problem you need to change to continuous form view or put your data in a subform instead.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:33
Joined
Oct 29, 2018
Messages
12,496
Well this noob is using split forms with success, though I will admit there are things I can't seem to do, such as referring to a specific record # in the datasheet. There are probably other things I haven't run into.

I don't like how a split form datasheet will force your entire form window's dimensions to the max and there is no way to control it. If that is a problem you need to change to continuous form view or put your data in a subform instead.
Hi. I'm interested in understanding your comments a little better. Could you please elaborate on your points below?
  1. What do you mean by you can't refer to a record # in the datasheet?
  2. What do you mean by the datasheet will force the entire window's dimensions to the max?
Thanks!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:33
Joined
Feb 19, 2013
Messages
12,539
it's a small niggle but the only thing I don't like about the shortcut menu is (Select All) scrolls (same in Excel). The number of times I start scrolling, find the value I want then realise I've not unticked the select all option - at least excel has a search box so you can limit the list.
 

zeroaccess

Active member
Local time
Today, 09:33
Joined
Jan 30, 2020
Messages
607
Hi. I'm interested in understanding your comments a little better. Could you please elaborate on your points below?
  1. What do you mean by you can't refer to a record # in the datasheet?
  2. What do you mean by the datasheet will force the entire window's dimensions to the max?
Thanks!
1. I tried variations of Gina's code to return the record selector to the previously selected record after a requery of the datasheet with no success.
2. If you bind a split form datasheet to a query, the resulting window will be huge and it does not respond to setting the window height/width in VBA.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:33
Joined
Oct 29, 2018
Messages
12,496
1. I tried variations of Gina's code to return the record selector to the previously selected record after a requery of the datasheet with no success.
2. If you bind a split form datasheet to a query, the resulting window will be huge and it does not respond to setting the window height/width in VBA.
Hi. Thanks for the clarification. You are not talking about the same code from Gina that @NauticalGent mentioned, correct? If so, can you please post a link to it, so I can take a look? I am not sure what you mean by binding the datasheet portion of a Split Form to a query. Did you mean you based the whole form to a query? I mean, the single view form and the datasheet portion of a Split Form both use the same Record Source property. They are not separate.
 

zeroaccess

Active member
Local time
Today, 09:33
Joined
Jan 30, 2020
Messages
607
Hi. Thanks for the clarification. You are not talking about the same code from Gina that @NauticalGent mentioned, correct? If so, can you please post a link to it, so I can take a look? I am not sure what you mean by binding the datasheet portion of a Split Form to a query. Did you mean you based the whole form to a query? I mean, the single view form and the datasheet portion of a Split Form both use the same Record Source property. They are not separate.
Yes, that is what I mean. Sorry for the confusion.

The issue I had with the requery was here: https://www.access-programmers.co.u...y-underlying-form-but-retain-bookmark.309650/
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 10:33
Joined
Apr 27, 2015
Messages
3,015
Well DBG, while I was duplicating the issue, I discovered what the problem is. In the datasheet portion of the split form, you can hide fields. If you try to setfocus on the mainform to a field that is hidden on the data sheet, you run into a problem.
Mystery solved and it just reaffirms my belief that splitforms are just not worth it.

Not a bad days work!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:33
Joined
Oct 29, 2018
Messages
12,496
Well DBG, while I was duplicating the issue, I discovered what the problem is. In the datasheet portion of the split form, you can hide fields. If you try to setfocus on the mainform to a field that is hidden on the data sheet, you run into a problem.
Mystery solved and it just reaffirms my belief that splitforms are just not worth it.

Not a bad days work!
Hi. Thanks for the update. Do you know if it's possible to modify the code to skip the hidden columns (or at least handle them more gracefully somehow)? Cheers!
 

deletedT

Guest
Local time
Today, 14:33
Joined
Feb 2, 2019
Messages
1,220
Last edited:

NauticalGent

CopyPaster of the First Order
Local time
Today, 10:33
Joined
Apr 27, 2015
Messages
3,015
Hi. Thanks for the update. Do you know if it's possible to modify the code to skip the hidden columns (or at least handle them more gracefully somehow)? Cheers!
Not for certain. If a hidden field is one you want to validate and the. Set focus on then the only work around I could think of would be to unhide the fields in question, finish up the before update code and then hide them again with an after update routine?

Even if that were possible, which I'm certain it is, that is a lot of work for something that can be achieved with less work.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:33
Joined
Oct 29, 2018
Messages
12,496
Not for certain. If a hidden field is one you want to validate and the. Set focus on then the only work around I could think of would be to unhide the fields in question, finish up the before update code and then hide them again with an after update routine?

Even if that were possible, which I'm certain it is, that is a lot of work for something that can be achieved with less work.
Okay, sounds good. However, I have to let you know, I just tried Gina's code on a Split Form with a required hidden column, and I didn't have any problems with it. Her code worked fine for me. Cheers!
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 10:33
Joined
Apr 27, 2015
Messages
3,015
Not really. I'll post it tomorrow...its 0130 here and I need to get some sleep!
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 10:33
Joined
Apr 27, 2015
Messages
3,015
Ok here it is. I have figured out what is causing the issue and I'm sure you will see it much quicker than I did!

At any rate, the issue goes away once you do one of three things:
1. Change to form from split to single.
2. Unhide the ReferredBy field in the datasheet.
3. Remove the code in the OnCurrent event.
 

Attachments

  • FITT Scientific 2.0.zip
    54.5 KB · Views: 15

Users who are viewing this thread

Top Bottom