Search results

  1. H

    read and write excel files .xlsm in vba (sql server)

    i have a database which is connected to sql server,this database reads the excel files paths from a folder and save them into the database... But i am wondering is there any way from vba that would read all the files (.xlsm) from a folder and save them into sql server (not just the path)! and...
  2. H

    upsizing access to sql server

    I have moved my database to sql server, but a memo field which should be unique ,when goes into sql server does not have unique records..I tried using this code CREATE UNIQUE INDEX UIX_YourIndexNamheHere ON dbo.tblExcelLocation(ExcelPathLocation) WITH (IGNORE_DUP_KEY = ON); but its of no use...
  3. H

    calling stored procedure from vba code

    I have code for calling stored procedure with parameters,which is as follows Dim qdf As DAO.QueryDef, rst As DAO.Recordset Dim IdValueToProcess As Long IdValueToProcess = 221177 ' test data Debug.Print (IdValueToProcess) Set qdf = CurrentDb.CreateQueryDef("") qdf.ReturnsRecords = True...
  4. H

    calling stored procedure from vba access gives run time error

    I am trying to call a stored procedure from access ,but it is giving me this runtime error : 2147217900 Syntax error or access voilation I am doing this first time so i dont know about how to pass parameters (IN and OUT).. My code is Public Sub createDataToAnalyze() Dim objConnection As...
  5. H

    checkbox not working after moving access to sql server tables

    i just moved my access databaseto sql server ,but the check boxes are not working any more in access and the values of sql server linked table field is showing up as -1 and 0.How can i enable my check box field on form? Any Idea?
  6. H

    folow hyperlink

    i am trying to open an excel file from a location,but it gives me an error "cannot open specified file", but when i open the file from the original folder it works fine. The code is also working fine with other files.but its just this file which is giving error! Any ideas?
  7. H

    run time error 3078

    can anybody see the problem with this code!??@ Run time error '3078' The microsoft access database engine cannot find the input table or query 'false'.Make sure it exists and that its name is spelled correctly. Set db = CurrentDb() Set ctl = Forms!frmVerifiedBy.Form!LotVerified...
  8. H

    loop through files and then compare with the file sin database table

    Hey all, I have to write a code for my database,i have folder with files "pending Review" and a table with column "tblExcelLocation". when i run my database all the files from pending review folder goes to "tblExcelLocation" on a click of button.But,if the files already exists it should not...
  9. H

    code for file exists in db or not!Really need it now

    Hey all, I have code working for some workers here ,who used to save excel files in a folder and my databse upload those files into database and then do the rest.I am looking for a code in vba which,on upload button matches the file in table and if the file already exists ,it should not...
  10. H

    upsizing access database to sql server 'error

    hey, I am trying to upsize the access database to sql server ,i have an odbc connection and when i try to move the tables,all the data is moving except one table "tblproductinfo" i have attached the table data and error.Need Help ///thanks in advance
  11. H

    shell command not working with the spaces in file name

    Hey Guys, I am in trouble with the shell ocmmand,i have a text box "ExcelPath Location" in which there is a path of excel file i am using below code to open the excel file but it gives an error: Private Sub Command11_Click() Dim str As String str = ExcelPathLocation.Value strPath =...
  12. H

    substring query

    i have lotnumber column in lot table ,and excelPath column in location table, lotnumber data is the substring of excel path column in location table,so i want a query in ms access which shows excelpath against lot number ..i dont know how to create that query..need help with that:banghead:
  13. H

    substring in vba ,code does not read the first excel file name substring

    I have a folder with 3 excel files ,and i want to read the files with names,and get a substring from the name of excel file,My code is working fine but the issue is when it reads the substring,it does not read the very first file ,the code is here : strFile = Dir(strPath & "*.xlsm") While...
  14. H

    exporting a query with combox text values into excel file

    I a trying to search some product from a search button and two combo boxes text values ,and on serch the vba code is : Private Sub Command4_Click() Dim db As DAO.Database Dim rs As DAO.Recordset Dim varRecords As Variant Dim...
  15. H

    run time error - type mismatch

    I have a query and i am trying to set into recordset ,but its giving run time error 13 (Type mismatch).Need Help With it to continue my work Private Sub Command37_Click() Dim db As DAO.Database Dim rs As ADODB.Recordset Dim SQL As String Dim currentItemNumber As String Dim PdfFileNameToStore...
  16. H

    table columns in record set ,how to view them in subform of a form in columns?

    Hi there, I have been searching for this this code lon time now.I have columns coming in my resord set ,how i can display them in my subform ,my subform contains 3 columns header ,id,area and description.As i am a beginner need immediate help with this! Private Sub...
  17. H

    record set shows nothing in the code ?

    HI, i have a combo box ,and when i should select "all",this button after update code should show me all the column of table test ,but looks like for no reason the record set shows nothing and its not working ,need help with it ! Private Sub cboTaskListName_AfterUpdate() 'On Error GoTo...
  18. H

    After Update macro convverted into vba code

    Hi, I have a combo box ,whose afterUpdate function is called with an event in vba ,which refreshes the subform and call an sql query on selecting "ALL". the code is not working because the refresh code is converted from macro to vba code. I need help with this. Private Sub...
  19. H

    need help with syntax

    Hi there, I m trying to write this query in vba code but it is constantly giving Private Sub cboTaskListName_AfterUpdate() Dim db As DAO.Database Dim SQL As String If Me.cboTaskListName = "**All**" Then Set db = CurrentDb() SQL = "SELECT tblDiscrepancy.DiscrepancyID...
  20. H

    how to add record set in report query

    here is my code Private Sub Command37_Click() Dim db As DAO.Database Dim rsItems As DAO.Recordset Dim SQL As String Dim currentItemNumber As Long Set db = CurrentDb() SQL = "SELECT test0.item FROM test0 " Set rsItems = CurrentDb.OpenRecordset(SQL) rsItems.MoveFirst Do While...
Top Bottom