0

Is it right that only way to create stored SQL procedure is to write VBA function like the following?

Public Function CreateProc()
   Dim strProc As String
   strProc = "Create Procedure qryCustByCity " & _
             "(prmCity varchar) as " & _
             "select * from Customers where City = prmCity"
   CurrentProject.Connection.Execute strProc
End Function

Or there is a more convenient way? Something like interactive command prompt would be great.

Nelson Tatius
  • 7,693
  • 8
  • 47
  • 70
  • http://stackoverflow.com/questions/3287545/how-do-i-make-a-stored-procedure-in-ms-access is it what u looking for? – indiPy Nov 21 '12 at 12:01

1 Answers1

0

The above could simply be created using the query design window with a little editing in SQL view, or simply choosing parameters from the right-click menu. See also How do I make a stored procedure in MS Access?

parameter query

Community
  • 1
  • 1
Fionnuala
  • 90,370
  • 7
  • 114
  • 152
  • From Access 2000 on, the right click menu included a parameter option ( I do not know about '97 ), so most certainly you can right-click for Access 2007 to get the parameter option. You can also edit in SQL view. – Fionnuala Nov 21 '12 at 12:14