sql in vba

  1. K

    Concatenating Multiple Columns in one row

    Hello Everyone, I have been on the web searching for answers and I just can not find one that works (I'm sure it is something I am not doing right) I have a table in Access called TBL003_Combined Data that has the following columns: UPLOADED REF ID QTY PART NUMBER ITEM DESCRIPTION SHIP TO...
  2. R

    Macro logistics - Most efficient place to put macro, help

    I have a report that is required to be ran twice a month with multiple steps required. My question is have to: 1. Run the report 2. Add the report to an existing tab for reference. 3. Complete multiple steps which require a. Filtering b. Deleting rows c. Insertion of columns...
  3. F

    How To Create Macro To Pull Tables From SQL Server

    I know nothing about Visual Basic but am trying to figure out the basic template to pull tables from SQL server. If someone could provide the basic template and just highlight where to insert by database and table information I would appreciate it! I have tried the following links but so far...
  4. D

    How do I paste in an SQL code into my excel vba code?

    Hi guys, Hopefully someone can help.
  5. K

    Using Excel to match columns according to business requirement

    Hello Everybody, I have a business requirement to come up with a list of conflicting duties for any person who has duties assigned. I am not able to get the logic to do this on Excel and would need some help. Tables I have (Inputs): 1) Name and Duty <tbody> <tbody> Name </tbody>...
  6. D

    Access SQL INSERT INTO VALUES Syntax Error

    Hi Mr. Excel Forum - I have a insert into statement and I am continuing to get a syntax error. I have reviewed the statement multiple times and still do not see where the issue is. I am sure it is a small punctuation error but because it is a rather long statement I can't figure out where the...
  7. D

    Run-Time Error 3134 - Syntax Error in Insert Into Statement

    Hi - I have an Insert Into Statement in my VBA code and I keep getting a run-time error 3134. I know there are a number of posts about this type of problem and I have tried all of the solutions I have found but nothing seems to work for this particular string. If someone sees the issue, can...
  8. D

    Create decile breakout in Access?

    Hi - I am looking to create 10 rages for a data set I have where each range will have an equal number of values in the range. Is there a function to do this in Access that is not too complicated? Thanks! David
  9. D

    IIF Statement Using Dates in MS Access/VBA/SQL

    Hi! I am trying to create a if/then statement using MS VBA and an SQL statement to update a new field based on the dates of the current date field. I thought that the code I had written would work well but when I try to run it I get an error saying there are an invalid number of arguments...
  10. W

    File Value to Cell based on Date and Catergory Selected

    Hi All, New to the forum :)! Thank you in advanced for your help. I am doing my personal finance in a work book and am looking to minimize input time. Each week I download my bank role and have it on a spread sheet. I go through and manually input the value to the cell associated with to the...
  11. T

    VBA use column values as parameter in SQL query

    I have a spreadsheet that pulls data from a SQL database. Then I have a button that lets the user FTP the sheet to send the manipulated spreadsheet to a customer. What I need to do is take one column of the spreadsheet, take the unique values in it and either use it as where clause in a sql...
  12. A

    userform to SQL mass UPDATE statment

    So I am working on a userform that populates all of its fields from a database (works flawlessly). The problem comes in when I attempt to UPDATE the database with any changes to the userform fields. To make matching easy, each userform field name is also a column name in the database. So i...
  13. M

    Select Data in SQL Table keyed to Excel Range using VBA

    I am trying to select data in an SQL Table that matches a list (or Table of part numbers I have in Excel 2007. The connection to the SQL database works but gives me the database field heading with no result. I can get a good result if I just use the SELECT query to be equal to a variable set...
  14. A

    using vba to store special characters in mySQL db

    I am using a simple SQL UPDATE statement to store userform textbox data into a database. The problem is that when a user types in the character " ' " or " \ " the data is not stored into the database. I don't receive an error it simply does not store the data. I thought it might be an...
  15. D

    Excel 2007 VBA code help for copying data from a SQL server file

    What I am having trouble with is that I have a SQL server report that gets generated every day and placed in a set location. My report has some macros to delete the last set of data copied and then update it with the fresh set of data, However though even when I move the SQL server report so...
  16. T

    PLEASE HELP:Recordset with SQL query

    So i want to create a recordset containing sql queries that i am going to call in a loop. but the thing is i am facing difficulty with the recordset, i know it is a stupid mistake that i am making please help : "Dim strSQL1 As String strSQL1 = "SELECT COUNT (INUNACPT) FROM AIS3AM4.KTPT80T WHERE...
  17. Avatar

    Excel VBA + Massive Array + SQL INSERT = HELP!

    Greetings, I have an array (dimensions: 1.5mil,14) containing data entries that i need to INSERT into an Access 2003 table. I am hoping to do this as a single SQL string... Is this possible? below is the code in a nut shell. Sub sbRun() Dim aryDataSet() Dim i As Long, _ lngTopRow As...
  18. P

    CopyFromRecordSet not returning column headings from sql

    Hi, I have written vba code to run a stored procedure and copy the result set by using the CopyResultSet from Excel VBA. I added a for loop to reference the column headers explicitly but when I check the value in the "watch" window it says there is no value in any of the iterations. Not sure...
  19. R

    SQL Query in VBA with variable number of columns

    Hi! I'm trying to generate code that allows me to use a fixed SQL query, embedded in VBA code, to pull data from a database. However, depending on the user, some of the columns may not exist in their version of the database. Where the column doesn't exist, I'd like to just have a '' (a...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top