My first try at getting a query to run from the Switchboard failed.
On the Property sheet I selected the Event tab; On Click I selected [Event Procedure]
Then I entered the following code. My expectation was to see a visible tab displaying the result of my query. The query works fine when I double click it in the Access Object window. I have no idea what to do to make it work.
The query is intended to compare the names in two tables as they must be equal to perform a cost allocation query.
Code:
Private Sub Option4_Click()
Dim mySQL As String
mySQL = "SELECT [tblAuthorizedPositions.Name] AS [AuthorizedPositionsName],[tblCS3Data.Name] AS [CS3DataName] FROM [tblAuthorizedPositions]RIGHT JOIN [tblCS3Data] ON [tblAuthorizedPositions.Name] = [tblCS3Data.Name]ORDER BY [tblAuthorizedPositions.Name]"
DoCmd.RunSQL mySQL
End Sub