Search results

  1. I

    Deleting rows in Excel

    Jandr272 You made a common mistake by forgetting to add the object. excelWS.Rows("1:7").Delete
  2. I

    Page header not appearing

    In case this question is still open... If you added the title in the section "Page header" this information will only be visible when you print the form (or open the print preview). To have it visible on your form on your monitor, you have to place the title in the "Form Header"
  3. I

    Change Format in Access VBA

    After the table is created, how is the field [AAA 2014 % TNS] defined? Is it double precission, is it a decimal, long integer?
  4. I

    MS Access VBA to Get Data from Microsoft Word Document and Paste it into Form (MEMO)

    Dear I was able to do this with next code. First of all, in the Access VBA Editor go to Tools - References. Enable next references Microsoft Word 14.0 Object Library Microsoft Office 14.0 Object Library note: depending your Office version, you might see something else than 14.0 Add next...
  5. I

    Change Format in Access VBA

    I would say you have to go to the table design mode and change the "decimal places"-parameter of the related field to 3.
  6. I

    Search button with text field

    My pleasure. If it is indeed solved, please mark the thread as solved. You'll find this option in menu "Thread Tools" (see second menu bar which can be found above your question).
  7. I

    Search button with text field

    JP80 Is the requested record already somewhere visible in the form? So if you use the record navigation buttons to browse manually through the records, do you actually find the record you search in the form? If not, my code will indeed not work. Below an alternative solution. If no record is...
  8. I

    Search for a record in Excel

    I would suggest to make a ADODB-connection towards the XLS and use SQL-statements. This approach might not work for all workbooks due to some limitations. Don't use this if you want to get/write more than 255 charachters. Delete-statements neither work. You must add a $ after the sheetname...
  9. I

    Return results of SQL Server query to Access

    Try this dim objConnection as ADODB.Connection dim rs as ADODB.Recordset Set objConnection = New ADODB.Connection set rs = New ADODB.Recordset objConnection.Open "DRIVER={SQL Server};SERVER=10.200.3.14;trusted_connection=yes; DATABASE=" & Me.Combo54 strSQL = "SELECT TABLE_NAME FROM...
  10. I

    deleting records within a certain timeframe

    I assume lrecDate contains the last timestamp the employee clocked. So a new record may not be created within 5 minutes of that last timestamp. This becomes
  11. I

    Search button with text field

    Another solution on condition the records are already in the form's recordset (does not matter whether it is single view, continuous view, datasheet view) and you want to jump to a particular one. One remark: code above assumes field UniqueAEVREF is defined in its table as a textfield. In...
  12. I

    MS-access VBA code does not add Excel's top row freeze correctly

    Problem solved with code provided by JHB
  13. I

    MS-access VBA code does not add Excel's top row freeze correctly

    I did debug the code, but the problem is that this "freezing pane"-code does not select anything. So you don't see what happens, even if the Excel-object is visible. So I went searching on the Internet and quickly found out other programmers also experienced problems with the "freezing...
  14. I

    MS-access VBA code does not add Excel's top row freeze correctly

    All I have an Access application which creates an Excel-file with multiple sheets by using VBA. For each Excel-sheet I want a "freeze on the top row". I tried several things with sample code I found on the Internet, but the freeze is always placed between column G:H and row 4:5. This...
  15. I

    code fails after second loop

    @JHB, many thanks. This was indeed the problem. After adding oxl. before Rows.count, the code runs withouth problem. oXL.Range("A" & oxl.Rows.Count).End(xlUp).Offset(1).Activate
  16. I

    code fails after second loop

    All For some reason next code fails after second loop on line oXL.Range("A" & Rows.Count).End(xlUp).Offset(1).Activate The first loop works perfect. I even have to reopen the form to get it work. Does someone have a solution or an idea why this code fails? lstData is a listbox. The purpose...
  17. I

    Update x Rows not working

    I found the solution. Seems it is as simple as update top(1) tblO set Status='In', Oms='20332055' where status='' and fk=826
  18. I

    Update x Rows not working

    All I use next SQL-command in MS SQL 2008 to update the top 1 record of my table. However, all records with FK=826 and status='' are updated. update tblO set Status='In', Oms='20331266' where fk in (select top 1 fk from tblO where status='' and fk=826) Does someone have a solution...
  19. I

    Open ODBC-table as read-only

    All I have next code in my MS Access 2010 to make a connection to a SQL-table. The code starts with the function Startup() and creates an ODBC-connection to a table "mytable" on an SQL-server. All of below works, but there is one problem. I only have one account which has full control on the...
  20. I

    Open query with "form element" as a dao.recordset

    Thanks! The "QueryDef.Parameters"-option did solve my problem: Dim db As Database Dim rs As Recordset Dim qdf As QueryDef Set db = CurrentDb Set qdf = db.QueryDefs("qrySelectedItem") qdf.Parameters("[forms]![frmmain]![cboItem]") = Me.cboItem Set rs = qdf.OpenRecordset While Not rs.EOF...
Back
Top Bottom