Compile error

Todd West
Todd West used Ask the Experts™
on
I want to have a form that has a single form view at the top and a datasheet view below.  I have tried working with a split form but was unable to get the results I wanted.  While searching online I came across code for a split form emulator:

https://access-programmers.co.uk/forums/showthread.php?t=294421

The code as provided is this:
VBA Code
My Code looks like this:
My VBA Code
where I want to get my data from  a query (Edit Actions Query) and the subform that contains the data sheet is named fsubActionEdit. However i get the following error when I try to go to form view.
Error screen shot
Any advice is greatly appreciated.
p.s. I am a novice using VBA so I would appreciate an explanation to any solutions if not a problem.

Thank You!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
Are you sure your Subform CONTROL is named "fsubActionEdit"?

Why not just set the Recordsource of the forms to that query? You're not filtering the data, so you just want the entire dataset. You can always Order the data as you wish with the Form's Sort Order property.
Todd WestBudget Analyst

Author

Commented:
You were correct, my form was named fsubActionEdit but I had not changed the object name.  As soon as I did it worked perfectly.  Thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial