Recent content by eblieb

  1. E

    Count number of columns in a table

    http://www.access-programmers.co.uk/forums/showthread.php?t=125603
  2. E

    Dcount within SQL Select statement

    der.. nevermind I missed an operator... Easiest way to debug a sql statement is to go into your database and design a new query... Then just place your query in that.. It debugs it a lot better than VBA SELECT ID, StudyTitle, Abstract, ArticleID, ReviewerID FROM qryReferences WHERE 1 =...
  3. E

    Converting an Excel VBA macro into an Access module?

    I have access run math all the time and store it like excel... Granted it is a nice headache...
  4. E

    Dcount within SQL Select statement

    If you are trying to Count Distinct... You have to do it the long way since Access (atleast access 2003) doesn't support count distinct. The way I have done it is (Select count(1) FROM (Select Distinct t2.exp1, t2.exp2, t2.exp3 from tableSomething as t2) as t1 Where t1.exp1 = t.exp1 AND...
  5. E

    Copying (multiple) records

    Explained by next post below
  6. E

    Check if a value exists in a table

    I just use Set dbs = CurrentDb dbs.Execute "Update [table] set columnA = valueA, columnB = ValueB Where ColumnC = ValueC;" If dbs.RecordsAffected = 0 Then dbs.Execute "INSERT INTO [table] (columnA, columnB, columnC) VALUES (valueA, ValueB, ValueC);" Else End IF It uses less resources...
  7. E

    New Record Doesn't display after Update

    You may want to rs.MoveLast if you aren't at the EOF...
  8. E

    Msgbox displaying a value in the string

    You can also do something like Do Until rs.EOF for each x in rs.Fields Msgbox "Supervisor " & rs![SupervisorField] & " has 5 evaluations completed" next rs.MoveNext loop That may not work as written but it is a general loop you can do to get more than the first record.
  9. E

    Exporting from Access to Excel - No Numbers?

    I am using Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Dim xlWS As Excel.Worksheet Dim acRng As Variant Dim xlRow As Integer Dim qry As QueryDef Dim rst As Recordset Set xlApp = New Excel.Application Set xlWB =...
  10. E

    Export Access to EXCEL with some unique twists

    I decided to go a different direction and am just creating 0s for the columns that I don't need the data in... Now I just have to export it to a template. I can't find a good example of exporting a table to an already existing excel file and set it to start at row (say 12)
  11. E

    Export Access to EXCEL with some unique twists

    I need to export data from multiple access tables into a single Excel template. The template already exists but has more columns then the access database and the data has to skip some columns. Say columns are A B C D E F G I need to take data from an access table and put that data into A B...
Back
Top Bottom