Split form not showing bottom pane when form is in data entry mode (1 Viewer)

lwill

New member
Local time
Tomorrow, 05:33
Joined
Dec 17, 2015
Messages
8
Hi all, wondering if someone can help me with this... I seem to be hitting my head against a wall here.

We have a split form setup that links to a Table. We've enabled data entry on the form because we don't want it to add a row until the submit button is pressed.

But when data entry is enabled, the split form doesn't show previous data. We'd still like people to see the previous entries, but not be able to edit or delete them.

So basically, we're trying to have a form that won't save until submit is pressed, and that will show previous entries in the split form, but won't allow edits or deletions. Would somebody be able to help me with my config?

We're using Access 2013.

Thanks Luke
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:33
Joined
Feb 19, 2013
Messages
16,605
you are not seeing the datasheet part because you are in data entry mode which means you can only enter a new record.

This is one of the limitations of the navigation form and the only way round it is to build you own.
 

lwill

New member
Local time
Tomorrow, 05:33
Joined
Dec 17, 2015
Messages
8
Thank you CJ_London for your response. I'm a bit new to access, so can you explain regarding building my own?
Build my own form? or Data Entry mode?
Thanks
Luke
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:33
Joined
Feb 19, 2013
Messages
16,605
build your own split form

the access split form effectively consists of a main form and a subform (the datasheet). The way it differs from the normal mainform/subform arrangement is that in the normal mainform subform arrangement the main form is the parent and the subform is the child (and usually showing related data from another table).

With the access split form the parent child relationships are reversed - so the subform is the parent and the main form the child, plus the tables for both are the same.

To create this yourself

1 create a mainform (form view) and a subform (datasheet view) both based on the same table
2. remove the linkmaster/linkchild values from the subform properties
3. in the subform on current event put the following code

me.parent.filter="ID=" & ID
me.parent.filteron=true

change ID to the name of your table autonumber/primarykey field

I've not tried this arrangement (never had the need) so it may be that by setting the mainform to dataentry, this will affect the subform as well, in which case do the following

1. create a third form with no recordsource or controls, just blank
2. add both the above two forms as subforms - we'll call them sfMain and sfDSheet
3. modify the code above in your sfDSheet to

me.parent.sfMain.Form.filter="ID=" & ID
me.parent.sfMain.Form.filteron=true
 

lwill

New member
Local time
Tomorrow, 05:33
Joined
Dec 17, 2015
Messages
8
Thank you CJ_London. I'll let you know how I go.
 

lwill

New member
Local time
Tomorrow, 05:33
Joined
Dec 17, 2015
Messages
8
Hi CJ_London,
Your first method is working really well and displays the right data in the datasheet. The only problem is that when I hit submit it doesn't update the table in the datasheet. It does if I close and reopen it, but doesn't do it live. Is there an onClick even I can do to update the subform?
Thanks
Luke
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 20:33
Joined
Sep 12, 2006
Messages
15,651
@iwill

I don't think you are correct.

A bound subform will update the table as you add records.
is your form unbound?

You don't really need a "submit" button (depending on what it does) - access doesn't use a "save" changes paradigm in the way that excel does.

it's worth adding record selectors to your form, at least temporarily while developing. as they give a visual indication of a dirty (unsaved edit).
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:33
Joined
Feb 19, 2013
Messages
16,605
in your mainform afterupdate event put

me.subformname.requery
 

lwill

New member
Local time
Tomorrow, 05:33
Joined
Dec 17, 2015
Messages
8
Hi CJ_London,
This is now doing exactly what I need it to do. The after update macro was the final piece of the puzzle. Thank you so much for your help on this one. It's made the whole process that much easier. I appreciate the help and knowledge.
 

Users who are viewing this thread

Top Bottom