RunSQL statement

Kinger43

racecar driver
Local time
Today, 13:10
Joined
Aug 17, 2007
Messages
226
Can anybody tell me why this SQL statement won't run in in the RunSQL macro action.

SELECT Open_Issues.* FROM Open_Issues WHERE ((Open_Issues.Account_No)=(Forms.Open_Issues_Viewer.Text64));

It tells me that the RunSQL action must have an SQL statement for an arguement when I try to run the macro. I thought that was a perfectly valid SQL statement considering i checked it with a query.
 
Run SQL is good only for ACTION queries (Insert, Append, Delete). Do open a select query you use DoCmd.OpenQuery.
 
Then maybe the better question is this. I have a form based on a table. What I want is a search box that will locate the record based on an account number and pull it into the form. I have buttons for navigating to the next and previous records but nothing that will search and find. I've tried the GoToRecord action, but I can't specify to look for that specific account number.
 

Users who are viewing this thread

Back
Top Bottom