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 biv343 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
  • Order by date
  1. GarHeard

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

    thanks for your perserverance PH. SELECT tblB.Branch, tblB.Email FROM tblB WHERE EXISTS (SELECT * FROM tblA WHERE Left(tblA.[Account Number],3)=tblB.Branch this worked perfectly!!!!!!!!!!!!!!!!!!!!!
  2. GarHeard

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

    Server: Msg 195, Level 15, State 10, Line 1 'First' is not a recognized function name. The SQL Server seems to take exception with First as a function name.
  3. GarHeard

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

    I tried: SELECT DISTINCT tblB.Branch, tblB.Email FROM tblA INNER JOIN tblB ON Left(tblA.[Account Number],3)= tblB.Branch The field Email is defined as ntext. Do you suppose this is causing the following error ? Server: Msg 8163, Level 16, State 3, Line 1 The text, ntext, or image data type...
  4. 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...
  5. 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...
  6. 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...
  7. GarHeard

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

    I apologize. I should have stated that branch is defined as nvarchar. Thus, I get the error message: Invalid operator for data type. Operator equals boolean AND, type equals navarchar.
  8. 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...
  9. 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'...
  10. GarHeard

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

    If the Excel file is not open, would I use CreatObject. If so, how would I revise the function ?
  11. 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...
  12. 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...
  13. GarHeard

    How to select distinct Customer records ? Error on SELECT

    DO you know why I received an error near the Keyword Group in the following: This was the result of executing a stored procedure comprised of a SQL string. CREATE TABLE tblFlLN ([First Name] nvarchar(25), [MI] nvarchar(1), [Last Name] nvarchar(25), [Address 1] nvarchar(35), [Address 2]...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. GarHeard

    Acceptable format for string passed to Stored Proc

    I further modified my SELECT INTO clause to incorporate the SPLIT function. Set @SQL = 'SELECT Null As Title, C.FirstName AS [First Name], C.MiddleInitial AS MI, C.LastName AS [Last Name], C.SecondNameFirst AS [Second Name First], C.SecondNameMid AS [Second Name Mid INTO...
  20. GarHeard

    Acceptable format for string passed to Stored Proc

    I am trying to add an array type function named Split into my Access Application as follows: CREATE FUNCTION SPLIT ( @InputText Varchar(104), @Delimeter Varchar(10)) RETURNS @Array TABLE ( Value Varchar(4000)) As BEGIN DECLARE @Pos Int, @End Int, @TextLength Int, @DelimLength...

Part and Inventory Search

Back
Top