View and Filter

CrazyCanuck

Registered User.
Local time
Today, 07:00
Joined
Sep 23, 2003
Messages
10
I have a form with a datasheet subform that I allow filters on. There are many columns on the table so it's hard to see them all. I'd like to be able to click a button to switch to Form view so I can display the currently selected row and naviagte through (having the form view only show filtered items).

I've tried to do this with Openform without success.

Any ideas on how I might do this, either by just switching the subform view from datasheet to form by pushbutton, or opening a new window?
 
I do this by having an abridged list of selected records in a datasheet. I pick one the fields, usually the one that sits on the left of the list.
I open the form in Design mode and edit the ON Click property for the field.

The code entered will be something like -

DoCmd.Openform "NewForm",acNormal,,"[PrimKey]=Forms!ThisForm!ThisSubForm.Form.PrimKey"

The Newform displays the record's fields in formview.
Remember to put something on the Mainform to let the user know it's there.

This 'clicking' on the subform fields can also be used to great effect when the fields are too long to be read in the preset column width.
I use the same principle, i.e. the On Clock property but change the code behind to read something like -


MsgBox Forms!ThisForm!ThisSubForm.Form.ThisField


It opens a message window and shows the full field contents.

HTH

Dave Eyley
 

Users who are viewing this thread

Back
Top Bottom