Mimic Splitform

itnchans

Registered User.
Local time
Today, 01:44
Joined
Nov 29, 2007
Messages
11
Hi,

I created a split form using the Access 2010 form wizard and tweaked it to fit my requirements.

I'm also using the SideMenuInterface by jhcarrell.

I configured SideMenuInterface to place this split form inside a subform, but when viewing the menu all i got was a normal form.

Does anyone know how to get a splitform to show correcltly in a subform.

Alternatively, does anyone have example of how to mimic splitforms inside a subform.

Thanks in advance
 
if you put in the subform's current event something like this:

Me.Parent.Filter = "ID = " & Me!ID

replace ID with your primary key field and put quotes around it if it's text:

Me.Parent.Filter = "strID = """ & Me!strID & """"

the subform mustn't be linked to the main form (no parent child fields)

That won't work :D (bear with me) because changing the filter of the parent will refresh the subform triggering a new current event

So the detail and the list both need to be subforms of an unbound parent.

Then, if the detail subform control is called say sbfmDetail then the code in the list subform's current event will be:

Me.Parent.sbfmDetail.Form.Filter = "ID = " & Me!ID

Selecting a record in the list will show the same record in the detail

The last thing is to handle new records in the list so we change it to:

Me.Parent.sbfmDetail.Form.Filter = "ID = " & Nz(Me!ID,0)

Shows no detail until the record is committed.

Oh and you're probably going to want a bit more code to handle updates on one subform to be reflected in the other.
 
Last edited:
It might be best to see what I mean.

Attached is a demo:
 

Attachments

Hi VilaRestal,

Thanks for the demo, I will redesign my splitform and see how I get on

Thanks.
 
Hi

Have played around and attached is what I have achieved. The problem I am facing is the embedded macros and how to reference subforms.

In the attached example, 'desktop' is the main form, and 'company list' is mimicing form 'xcompany list' which is the splitform.

If anyone has any pointers, i'd love to here from you.
 

Attachments

Users who are viewing this thread

Back
Top Bottom