Active X Microsoft Office Spreadsheet 11.0 in Access Form

bconner

Registered User.
Local time
Today, 02:39
Joined
Dec 22, 2008
Messages
183
All,
I have an Access Form that I have embedded an Active X object(Microsoft Office Spreadsheet 11.0) in. I would like to populate it with a query from within the same Access Database how can I do this? I have tried the below but I get the error "2455 You entered an expression that has an invalid reference to the property ControlSource"


Code:
SQL2 = "SELECT * FROM Report"
        
        Forms!FrmReporting.Spreadsheet8.ControlSource = SQL2
        Forms!FrmReporting.Spreadsheet8.Requery
        Forms!FrmReporting.Repaint

Basically when a Button is clicked I want to populate the Active X object(Microsoft Office Spreadsheet 11.0) on the form with data from the query "Report"
 
Won't you need to tell the spreadsheet where you want the data


Sent from my OMNIA7 using Board Express
 
How would I do that? I have never worked with this object.
 
It isn't so straightforward as it would seem. I started playing with it but gave up. The key is getting the correct properties like the Data Source - Sheet Data Source and Connection and more. You might try some other web searching to see if you can find anything.
 

Users who are viewing this thread

Back
Top Bottom