Recent content by The Archn00b

  1. T

    Nelson Mandela - Activist / Pacifist / Terrorist

    I certainly will. He has no time for political correctness.
  2. T

    Options for calling a subroutine

    Oh wait it's probably... Application.Run "DoSomething" & str
  3. T

    Options for calling a subroutine

    Imagine I have two subrountines: Private Sub DoSomething1() [Do Something] End Sub Private Sub DoSomething2() [Do Something] End Sub And this Declaration: Dim str As String str = 1 Is it possible to refer to/call one of these subroutines using something like this: ("DoSomething" & str)...
  4. T

    Problem with Control Declaration?

    No sorry guys. Still the same error on the same line.
  5. T

    Problem with Control Declaration?

    Hi everyone. Happy New Year to you all. I'm working on a user form that has a number of check boxes on the left. On the right hand side there are two text boxes for each check box. When a check box is ticked (set to true) the two text boxes on the right hand side become active. Rather than...
  6. T

    Access to Excel - inserting rows

    Hello everyone, I'm trying to add two rows to the top of an Excel worksheet "qryCFP" from a workbook using the following vba code from Access: Excel.Application.Workbooks("Path").Worksheets.("Sheet1").Rows.Insert I get the error message "subscript out of range." I realize that the code above...
  7. T

    Maximum Value in Excel Column From Access

    Yeah I just did that in the end. Good idea.
  8. T

    Maximum Value in Excel Column From Access

    Hi I'm using Excel vba for the first time and I'm trying to find the maxium value in the column AI (No. 35) in an Excel spreadsheet FROM Access. So I've got: Dim appExcel As Object Dim datLast As Date Set appExcel = CreateObject("Excel.Application") datLast =...
  9. T

    Field Names in Functions

    Thanks for the reply. Is this true even if the field name is in a SQL Query?
  10. T

    Field Names in Functions

    Hello everyone, I think this is a vba question at heart so I've posted this here. Adding fields into a function has been a problem for me: IIf((Count([qryADDR].[Fuel Type]>2), 'MPS', [qryADDR].[Fuel Type]) The logic I'm trying to create is the following: If the number of Fuel Types is...
  11. T

    SUM Query Data Type Mismatch

    lol And that method worked for me. There were two fields that were still non-numeric because of the limitations of an underlying query. Thanks very much. Excellent work!
  12. T

    SUM Query Data Type Mismatch

    Hello everyone, I think this is a vba question at heart so I've posted this here. I'm trying to use this in a query: SELECT [Table]., SUM(CDbl([Table].[Field])) AS [New Field] FROM Table GROUP BY [Table].[Code] The CDbl() is used because the original value for [Table].[Field] is of the...
  13. T

    Loop through recordset not recognizing .MoveNext?

    Sup fellas. Found the solution after going through it step by step. The dimension "strVALUES" should have been inside the Do/Loop. It wasn't subject to MoveNext and therefore stayed on the same record! Private Sub cmdSubmit_Click() Dim db As Database Dim strINSERT As String...
  14. T

    Loop through recordset not recognizing .MoveNext?

    uwotm8 :D Ah thanks
Top Bottom