Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE or DDE Error when running a query from Switchboard

Status
Not open for further replies.

mauricionava

Programmer
Jul 8, 2005
209
0
0
US
Hello, I have a query with another query inside it that can be ran by pressing a button from a switchboard. The first query is the following:
Code:
SELECT [__acct and title].ACCT, [__acct and title].NEWSTOCK, [__acct and title].STATUS, TRDATA.NEWSTKLOT, TRDATA.LOT, TRDATA.BUYER, [__acct and title].TITLE, [__acct and title].SOLDDATE, Int(Now()-trdata.SOLDDATE) AS days
FROM [__acct and title] RIGHT JOIN TRDATA ON [__acct and title].ACCT = TRDATA.ACCT
WHERE ((([__acct and title].STATUS)<>"P") AND (([__acct and title].TITLE) Is Null Or ([__acct and title].TITLE)="") AND (([Principal]-[princ_pd])>10))
ORDER BY Int(Now()-trdata.SOLDDATE) DESC;
And the __acct and tittle is as follows:
Code:
SELECT TRDATA.ACCT, TRDATA.STATUS, TRDATA.NEWSTOCK, TRDATA.SOLDDATE, INVPLUS.TITLE
FROM TRDATA LEFT JOIN INVPLUS ON (TRDATA.NEWSTKLOT = INVPLUS.LOT) AND (TRDATA.NEWSTOCK = INVPLUS.STOCK)
WHERE (((TRDATA.SOLDDATE)>#1/1/2001#));
When I click the button to run this query it gives me an error "If you're running a Visual Basic module that is using OLE or DDE, you may need to interrupt the module."
I dont know what it means and I have researched but nothing found.

I am not using Visual Basic on these queries that I know.

Please help!! Thanks!
 
What is the code behind the button on the form that runs these queries?

~Melagan
______
"It's never too late to become what you might have been.
 
This is the code behind the button that runs the first query posted:
Code:
Private Sub btnAllMissingTitle_Click()
On Error GoTo Err_btnAllMissingTitle_Click

    Dim stDocName As String

    stDocName = "All Missing Titles"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_btnAllMissingTitle_Click:
    Exit Sub

Err_btnAllMissingTitle_Click:
    MsgBox Err.description
    Resume Exit_btnAllMissingTitle_Click
    
End Sub

Any clues?
 
Can you run the query by itself, without using the form/button to do it? If so, what happens?

~Melagan
______
"It's never too late to become what you might have been.
 
The thing is that the query is in a switchboard that can only be open in runtime mode. The query runs fine in my computer where I have the full Microsoft Access and not the runtime but in other computers is where it gives me the error. The only way to run the query is by placing a button to run it in the switchboard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top