Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show split Forms in navigation subform?

Tags:

ms-access

I've created split forms in my MS-Access 2013 application. They work well individually but when I open them through navigation form they appear as single in navigation subform. Tried many options but could not figure out what is going wrong.

like image 305
WSK Avatar asked Sep 18 '13 19:09

WSK


2 Answers

As far as I know, you cannot have a split-form as a subform. If you try, only the top part of the split form will be visible as you found out.

You can however try to build a "fake" split-form by hand by using a simple subform containing a datasheet that you link to the parent form.

You will then be able to include your "fake" split-form in the Navigation form.

like image 116
Renaud Bompuis Avatar answered Oct 06 '22 04:10

Renaud Bompuis


Referencing Renaud Bompuis accepted answer. Answering to Antony Hatchkins. He asked how to link the two subforms with each other, so the corresponding item to the selected record in datasheet subform is shown in form subform

In parent form you model a public sub. In the datasheet subform you register the OnCurrent event. On which you read out the tables primary key and call the public sub of the parent with the primary key as argument.

The public sub sets the recordsource of the form subform with the correct sql including the "WHERE" clause in which you use the primary key to identify the correct record to display.

Be aware of the fact that subforms are loaded before the parent form, which means you should let the recordsource update only be executed after the parent load event is finished otherwise you run into errors.(plenty of possible implementations for that)

you'll have a really little delay, caused by the database queries but I think that is acceptable, since the user has not the chance to enter anything wrong in that time.

like image 21
wulfithewulf Avatar answered Oct 06 '22 04:10

wulfithewulf