UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Need A Quick Code Check, It's Only 10 Lines...., Office 2007    
 
   
David92595
post 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
Go to the top of the page
 
+

Posts in this topic


Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 01:16 PM