Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Golom
  • Order by date
  1. Golom

    Creating multiple records with a comma separated field

    There is faq701-6293 that does that although it is a bit complex.
  2. Golom

    Does anyone know what Err # -2147221233 means?

    That's an Outlook error and there are several discussions about it in Google
  3. Golom

    using vba to freeze panes error 438

    How 'bout If iSheetCount = 5 Then goXL.ActiveWindow.FreezePanes = True
  4. Golom

    Another query problem

    These "SET = ...("SumOfBalls") & _ ARE NOT spaces in the SQL statement. They are a part of the VBA syntax. If you wanted a space there then you would need to explicitly put it in. "SET = ... ("SumOfBalls") & " " & _
  5. Golom

    runtime error 2471 Dlookup

    Nor do I. It just seems wrong to have variable values enclosed in quotes floating around in my code. At best it's confusing and error-prone as in this case.
  6. Golom

    runtime error 2471 Dlookup

    You already have quotes around the field. modelNumber = "'" & modelNumber & "'" and you are adding more of them in the DLookup Also, your syntax is incorrect. It should be DLookup("ModelID", "TblModel", "ModelNum=" & modelNumber )
  7. Golom

    Trying to convert crosstab query to VBA

    You are missing a comma and a space after billpd as 4 and you have a spurious comma after billpd as 14 Would this be easier? Public Sub GetData() Dim strSQL As String Dim db As DAO.Database Dim rst As DAO.Recordset Dim iRow As Integer Dim iCol As Integer Set db = CurrentDb iRow =...
  8. Golom

    Order of battle in a query

    First the UPDATE to identify the table, then WHERE to filter the table and finally the SETs. I assume (but don't know for sure) that the SET clauses are executed in the order presented. In this case it doesn't much matter since all the specified fields are updated when the query completes and...
  9. Golom

    help with the IF clause to update query

    Try this qryTblOrderUnit = "SELECT * FROM TblOrderUnit " & _ "WHERE OrderID=" & OrderID & " AND UnitID=" & UnitID Set tblOrderUnitRS = dbs.OpenRecordset(qryTblOrderUnit) With tblOrderUnitRS If .EOF and .BOF Then strSQL = "INSERT INTO...
  10. Golom

    Return VBA ADO recrordset to Access Query

    That's what I thought ... A query (which is what you created in the query design wizard) is an SQL statement and it may be used to generate a recordset in VBA by running the query ... HOWEVER ... Query SQL and a recordset are completely different creatures and you cannot combine one with the...
  11. Golom

    Insert into query not working

    Exactly how are you attempting to run the INSERT query? It may be silently failing because you are using code that suppresses the errors.
  12. Golom

    Return VBA ADO recrordset to Access Query

    If your Query Definition SQL is stored as a query (as opposed to being run from VBA) then you need to set up another query (lets call it DetU) with some dummy SQL. Then in your DetermineUnits routine. Public Sub DetermineUnits(Optional ByVal ViewName as String = "DetU") Dim cat...
  13. Golom

    Problem with Refresh link (tdfTable.RefreshLink) in VB Script

    The link I posted pretty much explains how to set up the ODBC DSNs. I'm not an Oracle user but I have a suspicion that the change to 11g may require that you have different DLLs installed on your machine. You may want to check with your Oracle gurus to see if your local machine needs to be upgraded.
  14. Golom

    ? Compatibility issues with Access database and 64 bit systems

    Here's one possible issue. If you are declaring API functions then you need to deal with the changes from VBA6 to VBA7 as used on 64-bit systems. And this is a similar take on it.
  15. Golom

    Wrting values to an ini file

    Your code looks correct except that I don't see where IniFileName is defined. I assume that you mean section = "TRAY" Keyname = "Paper" Value = "Letterhead" That should create a IniFile that looks like [TRAY] Paper = Letterhead I would modify your routine to Private Function...
  16. Golom

    Wrting values to an ini file

    Use the WritePrivateProfileString API call. The VB definition is Public Declare Function WritePrivateProfileString _ Lib "kernel32" Alias "WritePrivateProfileStringA" _ (ByVal lpSectionName As String, _ ByVal lpKeyName As Any, _ ByVal lpString As...
  17. Golom

    Office.FileDialog check if one or more files exist

    Just need to re-initialize "WriteOption" on each pass through the loop. 'Extracts specified Blob to file. Private Function ExtractBlobAll(strPath As String) As Boolean On Error GoTo Err_Handler Dim strSQL As String Dim rst As Object...
  18. Golom

    Office.FileDialog check if one or more files exist

    Gotta be some problem with adTypeBinary and/or adSaveCreateOverWrite. Let's go back to the way you had it. 'Extracts specified Blob to file. Private Function WriteBinaryFile(varFileBinary As Variant, _ strFile As String) As Boolean...
  19. Golom

    Insert records to SQL table using MS Access (VBA)

    Assuming that the SQL server tables are linked into Access, the usual way is INSERT INTO mySQLServerTable (Fld1, Fld2, Fld3, ...) SELECT FldA, FldB, FldC, ... From myAccessTable WHERE ... Some logical Conditions ... This assumes of course that you are authorized to modify the SQL Server...
  20. Golom

    Office.FileDialog check if one or more files exist

    Try it this way Private Function ExtractBlobAll(strPath As String) As Boolean On Error GoTo Err_Handler Dim strSQL As String Dim rst As ADODB.Recordset Dim cn As ADODB.Connection Dim strFile As String Dim...

Part and Inventory Search

Back
Top