My Assistant
|
|
Apr 11 2012, 07:12 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 243 |
Hello, some where in here there is something wrong with my code. I'm trying to run some vb to push to a Access 2007 pass-through query connected to a SQL Server.
Per_Diem_Calculator is the name of the query and usp query on the sql side. Forms![NewOrdersCa]![TS] is essentially the current ID number on the form I'm viewing to compare to a variable I created on the SQL side. CODE: Dim DB As Database Dim A As QueryDef Set DB = CurrentDb() Set A = DB.QueryDefs(Per_Diem_Calculator_CA) A.SQL = "exec dbo.usp_Per_Diem_Calculator_CA & " '" & Forms![NewOrdersCa]![TS] & "'" DoCmd.OpenQuery "Per_Diem_Calculator_CA" Thank you! David92595 |
|
|
|
David92595 Need A Quick Code Check, It's Only 10 Lines.... Apr 11 2012, 07:12 PM
GroverParkGeorge What is happening that shouldn't be, or what i... Apr 11 2012, 07:20 PM
David92595 It should be passing "exec dbo.usp_Per_Diem_C... Apr 11 2012, 08:11 PM
GroverParkGeorge This line should be
Set A = DB.QueryDefs("P... Apr 11 2012, 10:42 PM
David92595 THANK YOU!!!!
I knew it was so... Apr 12 2012, 12:19 PM
GroverParkGeorge Congratulations on resolving your problem. Continu... Apr 12 2012, 01:49 PM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 01:16 PM |