423,350 Members | 2,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,350 IT Pros & Developers. It's quick & easy.

Show Hide record selectors

PhilOfWalton
Expert 100+
P: 1,297
I find it useful on occasions to sort continuous subforms in date order, with the latest date on the top, and the blank new record line above the first record as per this illustration.


Basically it consists of a standard continuous form, but with an identically formatted subform in the header just above the detail in the main form.

It all works perfectly, but it would be nice to see the record selector in the new record, and not in the continuous subform.

If I show the record selector in the subform, the alignment goes wrong.

It's not a real problem, just aesthetics.

Phil
Attached Images
File Type: jpg Continuous form.jpg (135.2 KB, 63 views)
2 Weeks Ago #1
Share this Question
Share on Google+
10 Replies


zmbd
Expert Mod 5K+
P: 5,279
Have you tried:
Design View
Show your property sheet > Format
Ribbon>Form Design Tools>Arrange

Here's the fiddly bit

Select some controls
At this point
Ribbon>Form Design Tools>Arrange>Table tools should become active
Select Tabular
THIS WILL MESS UP YOUR LAYOUT
while your new table is active
<Ctrl><A>
Your format tab in the property sheet should now show the gridline style, color, width, etc... I usually set these to 2pt, dots, purple because I don't tend to use these styles in forms.Typically the new cells/rows/columns that you insert will not have the gridlines set you have to fiddle with these settings.

Here's the beauty of this, you can now add rows, columns, split and merge cells etc...

The controls are VERY finicky; however, I created a class roster using this method...
Has Anyone Attempted a Report for a Class Attendance Log?

You may be able to use this same method for your form alignment issue.
2 Weeks Ago #2

zmbd
Expert Mod 5K+
P: 5,279
Ok PhilOfWalton
I'm up WAY too late tonight - should have been in bed hours ago...
Two Screen shots showing POC for the table/layout
The Solid red-lines are the gridlines for the table, normally they would be transparent.
The parent and subform are just some forms I had to play with... for POC these should work for an example.
With a bit more tweeking I'm sure you can obtain the proper control alignments your're after.
The subform in the header also has the table/gridlines also shown in solid-red lines



Good Night - Sweet Dreams - (z_z)
Attached Images
File Type: jpg POC_Layout_DsgnView.JPG (109.7 KB, 56 views)
File Type: jpg POC_Layout_FrmView.JPG (38.0 KB, 56 views)
2 Weeks Ago #3

PhilOfWalton
Expert 100+
P: 1,297
Sorry for the delay in relying.

Have played around with grids with no joy.
The reason is that say a record selector is 1/4" wide. The closest any control (including a subform control can be to the left hand side if the form is 1/4"

So the left most control on the subform will be 1/2" from the main form's left border. They can never be aligned

Plan B is a blank Main Form "container" and 2 subforms - SubFrmAdd set to add only which goes in the Main Forms Header, and a continuous SubFrmEdit which allows editing and deleting records.



So the problem with that is we have 2 current record indicators.

Ideally, if the top SubFrmAdd has the focus, there would be no Current Record indicator in the continuous SubFrmEdit, and conversely, if SubFrmEdit had the focus, there should be an * in the SubFrmAdd Record selector.

Phil
Attached Images
File Type: png Continuous form.2png.png (26.2 KB, 42 views)
2 Weeks Ago #4

zmbd
Expert Mod 5K+
P: 5,279
IIUC:
+You only want the record selector arrow to show in the subform in the header of the parent.
+You want the the records on the parent form flush aganst the left hand edge of the form

If this is correct then your parent/double-subform maybe your only option.

If you use the grid, you should be able to offset the parent records by the width of the child subform record selector; thus, aligning the fields in both forms. While I didn't get this exactly right in the POC images I posted I was hoping to show this as a possible solution.
.

+ Can you attach your database that you are using to demonstrate the desired effect?
2 Weeks Ago #5

PhilOfWalton
Expert 100+
P: 1,297
Hi zmbd

Thanks for your reply. Attached DB.

There are 2 versions of the main forms - FrmMain & Modifications. Both self-explanatory, I think.

As a total aside is that I have TblModifications in all my FE databases, and record all design changes to the DB. My standatd Menu (Switchboard) system shows the version number, so if a client contacts me with a problem it is easy to establish if he has the latest version.

In the BE database, I hold a table called BEMods where I record any changes to the BE tables. So when the Menu loads, one of the first checks is that the BEMods table version is identical to the TableVersion in the FE.

This is particularly useful when different organisation use the same FE and each have their own BE (Yacht Club, Bridge Club etc) using identical table structures. Obviously not all the fields are relevant, to different organisations, but if I have to modify a table for one Club, and give them a new front end with the new TableVersion, and forget to do the same modification for the second club, I get an error message.

Anyway, that's an aside

Phil
Attached Files
File Type: zip ContinuousSubform.zip (53.8 KB, 5 views)
2 Weeks Ago #6

zmbd
Expert Mod 5K+
P: 5,279
Got it... tied up with other projects for a bit. I should be able to take a look at it this evening.
2 Weeks Ago #7

zmbd
Expert Mod 5K+
P: 5,279
PhilOfWalton:
Does this work?



Attached database with this modification.
Attached Images
File Type: jpg 971307_ZMod.jpg (74.4 KB, 30 views)
Attached Files
File Type: zip ContinuousSubform.zip (217.7 KB, 6 views)
2 Weeks Ago #8

PhilOfWalton
Expert 100+
P: 1,297
Hi zmbd

That idea put me on the right track, but the problem was that the record selectors didn't show up on the continuous form

This latest version (only FrmMain2 and SubModifications2 are relevant.

As you will see I have added "dummy" record selectors - star, arrow and pencil.

The adds, edits & deletes all work perfectly for a single record
My stumbling block is selecting a number of records simultaneously for deletion.

Would be grateful for any further thoughts

Phil
Attached Files
File Type: zip ContinuousSubform.zip (71.4 KB, 2 views)
2 Weeks Ago #9

zmbd
Expert Mod 5K+
P: 5,279
That idea put me on the right track, but the problem was that the record selectors didn't show up on the continuous form.
Ok, I didn't get the concept that you wanted the record selector to show up in the continuous form too...

Without taking a look at your revised DB... we had my God-Children along with my four for a sleep-over last night (8 kids from 3yr to 15yr) - my ears are still ringing from the cacophony :)

My thought here is in the current_record event check if on new record and if true then set the empty cell width as I have it now, set the show record selector to false for the continuous form, set the show record selector true for the subform and a bit of vba to get the other field widths to line up. May be able to pull the grid-columns up thru the header and subform. I'll have to think about that when I get more time tomorrow.
2 Weeks Ago #10

PhilOfWalton
Expert 100+
P: 1,297
Hi Zmbd,

Sorry I obviously didn't make myself 100% clear on what I am trying to achieve.

Ideally, MS should have provided an option with continuous forms to have the New Record above the first record i.e., if you use the navigation buttons to go to the first record, the New record would be above it. All implementations of Access have the new record after the last record. Particularly illogical if the form is sorted in something like date order, where logically, a record with zero date (New Record) should appear before the first record with a genuine date.

Anyway what I am trying to achieve is what appears to be a completely normal continuous form, including filters, sort orders, the ability to select multiple records (for deleting or copying etc), shortcut right click menus that behave normally and the ability to paste multiple records.

I think this could be a useful addition to many developers, as it is a pain in the a.se to have to scroll down a long continuous form

Phil
2 Weeks Ago #11

Post your reply

Sign in to post your reply or Sign up for a free account.