Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: GarHeard
  • Content: Threads
  • Order by date
  1. GarHeard

    How to write a select to retrieve the tbl B Branch and Email ?

    If I have: table tblA with a field: ------------------------------------------------ [Account Number] defined as nvarchar 10 table B with 2 fields: ----------------------------------------- Branch defined as nvarchar 3 Email defined as ntext 16 sample of...
  2. GarHeard

    How to modify a Select clause to compare a nvarchar to an int value ?

    How would you modify the following module to loop through replacing variable intBranch with variable [Account Number] which is defined as nvarchar 10. The first 3 positions of [Account Number] are similar to intBranch and contain the values '001' through '999'. For ex: [Account Number] 001...
  3. GarHeard

    How to separate a table's values into separate spreadsheets ?

    I am creating an Access application using Access as the front end and SQL Server as the backend database. I have a table named tblA consisting of the following 2 fields: Branch Customer ---------- -------------- 1 121 1 122 1...
  4. GarHeard

    How to add a literal value to the end of a SELECT clause ?

    Is there a way I can place the following SELECT clause: SELECT Branch FROM tblBranches ORDER BY Branch in a Row Source of a List Box and in addition ADD an additional SELECT value of ALL to the tail end of the list. For example, let's say tblBranches.Branch has values of 101, 102, 103, 104...
  5. GarHeard

    How to prevent Run time error '2302': Microsoft Office Access can't

    If one user of my application clicks on a button to create an Excel file report, my Access application works fine. However, if that user has the Excel file open and then another uses clicks on a button to create yet another Excel file, I get the error message as follows: Run time error '2302'...
  6. GarHeard

    How ti modify Output to function to send a table to an Excel file ?

    I would like to send a table which I know has records in it to an Excel spreadsheet and open the spreadsheet for the user. The user could then save the spreadsheet if desired. I tried using the following sub procedure and functions. The Excel file does open but no records are displayed. Instead...
  7. GarHeard

    Runtime error '2105: You can't go to the specified record

    I am using Access as a front end for my application and SQL server as the back end database. I created a LOGON form with the following sub procedures. When I double click on the ADP file to launch my Access application, the following line is highlighted in the Form_Open paragraph...
  8. GarHeard

    How to select distinct Customer records ? Error on SELECT

    In the following Stored Procedure my objective was to select unique Customer Records. I select all the field in the Customer table. However, I can't simply use a SELECT DISCTINT statement because I also SELECT 2 fields from the Product table. There is a 1 to many relationship between the...
  9. GarHeard

    CurrentDB object invalid in ADP, how to replace it ?

    The following statement works fine when I use it in an MDB file. However, I converted my Access Application to an ADP and now I get the following error message: Run time error '91': Object variable or With block variable not set The offending line is as follows: CurrentDb.Execute "UPDATE...
  10. GarHeard

    How to reformat a date sent via an Access Report To Excel ?

    I execute the following stored procedure to create 3 tables. I then created an Access Report and read the last table created named tblRange as the Report: Record Source. In the Header section, I have 2 text boxes. 1 text box has a control source of DFrC which is a field in tblRange. The other...
  11. GarHeard

    How to join 4 tables and select a calculated field

    How would you write the following query ? I have a table of Customers AS C with a CustomerNumber (Primary Key) , State , DateA. I have a table of Products AS P with a CustomerNumber (Foreign Key) and Property Type. I have a table of StateCodes AS S with a State. I have a table of...
  12. GarHeard

    No rows returned by Stored procedure using variable string parameter

    I execute the following statement to test my stored procedure dbo.FAllStates and function dbo.SPLIT in query analyzer as follows: EXEC dbo.procFAllStates 2005,'A',NULL,NULL,'''''AL'''',''''AR'''',''''AZ''''',NULL the result of the generated sql code is as follows: (0 row(s) affected) SELECT...
  13. GarHeard

    Acceptable format for string passed to Stored Proc

    What would be an acceptable format for a string to pass to a parameter @StateF in the following Stored Procedure ? the last If statement is as follows: If @StateF Is Not Null BEGIN SET @SQL = @SQL + ' AND C.State In ' + @StateF END I tried the following string but I wasn't...
  14. GarHeard

    TransferSpreadsheet function workaround using Dynamic Query

    I built a dynamic SQL statement in a string named strSQLFS and passed it along as a parameterized stored procedure as follows: I wanted to perform a Transferspreadsheet to output the result of this stored procedure to an Excel file. However I believe you cannot pass a dynamic SQL statement to...
  15. GarHeard

    Excel/CopyFromRecordset Method/Run-time error '-2147319779(8002801d')

    I noticed the following on an MSDN website: CopyFromRecordset Method Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range. If the Recordset object contains fields with OLE objects in them, this method fails...
  16. GarHeard

    CopyFromRecordset Runtime Error '-2147319779(8002801d')

    I noticed the following on an MSDN website: CopyFromRecordset Method Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range. If the Recordset object contains fields with OLE objects in them, this method fails...
  17. GarHeard

    CopyRecordSet

    I noticed the following on an MSDN website: CopyFromRecordset Method Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range. If the Recordset object contains fields with OLE objects in them, this method fails...

Part and Inventory Search

Back
Top