Search results

  1. G

    yet an other newbee... (syntax question)

    thanks, I just did 'set company number strCompanyCode = "'15'" 'Open Filtered report DoCmd.OpenReport "Invoice", acViewPreview, , "Inv_CCE = " & strCompanyCode and it worked also. GREAT /G
  2. G

    yet an other newbee... (syntax question)

    Hi, I am trying to create a report from vba with a condition. So far I have tried: Dim IntCompanyCode As Integer DoCmd.OpenReport "Invoice", acViewPreview, , Inv_Nr = 15 and: IntCompanyCode = 15 DoCmd.OpenReport "Invoice", acViewPreview Invoice.Filter = "((Inv_Nr) = " &...
  3. G

    Extra ' in excel

    Extra ' in excel, please help Hi all, When I use: objDB.Execute _ "SELECT * INTO [Excel 8.0;DATABASE=" & strExcelFile & _ "].[" & strWorksheet & "] FROM [" & strQuery & "]" I get an extra single quotation mark (') at the begining of every post in Excel. Does anyone know why and how I...
  4. G

    SQL in access,

    I solved it. It should have been: WHERE '[" & strString & " ]' = Namn little ' around the string /G
  5. G

    SQL in access,

    Hi Pat, Namn is not a string. It is the name of a column in the query. I can use it like that in the following case: MySql = "SELECT Namn INTO [Excel 8.0;DATABASE=" & strExcelFile & "].[" & strWorksheet & "] FROM [" & strQuery & "]" Then offshore I only select one of the columns. But it...
  6. G

    SQL in access,

    Hi all, I want to create a module that exports data to excel. I found some help on the internet but I can't get it to work. This is my code: strExcelFile = "H:\TEMP\test.xls" strWorksheet = "test" strDB = "H:\TEMP\testdatabas.mdb" strTable = "tabel" strQuery = "query" strString = "Name"...
Back
Top Bottom