User Profile
Collapse
-
It would seem that the easiest solution to accessing the split forms module variables is to Declare them as public, and access then using Forms(me.name). VariableName as this will reference the Main instance of the form whether called from the Main or DataSheet instances of the split form. -
Thanks ,
Very clearly illustrated with your demo, the Me form object returns different references dependent upon whether you are in the Main form or the Datasheet, although they both return the same name. Once the form has opened it is possible to capture both the Me objects to named objects, and then use [named object].Control(“...”) .setfocus or whatever to access either the Main or Datasheet methods and properties. However, to capture...Leave a comment:
-
F6 will toggle the focus between the detail and datasheet section. I have been unable to find any syntax for moving the focus in VBA and resort instead to SendKeys "{F6}{F6}". You can determine whether the focus is in the datasheet by setting a Module Variable, it will not be available when the focus is in the datasheet.Leave a comment:
-
I have had the same difficulty in accessing form module variables in split forms. I have found that if the cursor/focus is in the detail section as opposed to the datasheet the variables are exposed. There seems to be no syntax for moving the focus that I have been able to find, except for F6. In my code I test for the variable and if empty I move the focus by sending - SendKeys "{F6}{F6}", this is grossly inelegent, but needs m...Leave a comment:
-
Me.Filter fails Access 2007
In Access 2007 I have encountered instances where Me.Filter = "... " fails to operate for a split form. Using a reference set to the form object e.g. frmObj.Filter = "...." also fails to operate.
(In both these cases .Filter = " ... " is followed by .FilterOn = True. and in both cases a debug statement shows that the Filter and FilterOn have been updated as entered. However, using Forms![formname]![subformname].form.Filter...
No activity results to display
Show More
Leave a comment: