Many thanks. That has worked.
Another good link is:
http://www.sqlservercentral.com/Forums/Topic657473-131-1.aspx where an example database is available.
I have tried using this code but get an error when compiling the VBA on the ADODB.Command line.
I have added a "reference" to "Microsoft ADO Ext 6.0 for DDL and Security" (the only ADO Reference I can find). What have I done wrong!
Actually what I am trying to do is run a SQL Stored procedure...
The CONVERT function is a good point and I missed that in my earlier post!!
I have made some changes to the bracketing used and have removed some in the code below.
I'm not sure that you really need the BEGIN END block so have removed them.
See how this goes:
CREATE PROCEDURE...
You will need to add a FROM statement. Without understanding your database structure I would suggest something like this:
CREATEPROCEDURE [AP_POT].[Update_ExpectedPaymentDate]
-- Add the parameters for the stored procedure here
AS
BEGIN
UPDATE AP_POT.prod_AP_Inv_POT
SET...
Well the feature you are talking about is an application form design feature and not a database feature. They are 2 totally seperate things and I wouldn't expect to see that functionality in SQL Server.
If I understand your question properly you are confusing the functionality of Access and SQL Server.
Providing you have setup your SQL Server Database properly and linked the tables then a Combo Box will work the same.
This seems to me to be a conflicting ODBC Connection. Ensure that all users have the same DSNs to the Sql Database on their PCs.
I have had similar issues with Access databases that link to SQL Server.
HTH
I have just experimented with Pass Through Queries (PTQ) for the first time as in the past I have always used linked tables. I can certainly see the benefit of PTQ as it seems to take the processing away from the local PC and Jet Engine.
However what I can't work out is how to use them with...
Are you doing this in SQL or Access? As your post is in the SQL Server Forum I am assuming it is SQL. T-SQL doesn't support the IIF() function and provides the CASE expression instead.
See: http://msdn.microsoft.com/en-us/library/ms181765.aspx
I think this is because the columns in the spreadsheet have a mix of data types (from your example). I believe that Access tries to determine the datatype of the columns in the linked spreadsheet and fails hence the error.
I need to show the value of Sales Opportunities in a pivot table with Months as column headings and the Sales Managers names as rows.
Where there is data in the underlying database (spreadsheet is linked to a SQL server database) then there is no problem. However if there is no data for a...