Recent content by steveboydon

  1. S

    Self joins

    Hi All, What are your thoughts and experiences on sefl joined tables. I have used them and they seem to work very well. Overall would you say that they are slower, faster or the same as normal tables. As a concept i find them really useful and try to use them in my apps. For those who...
  2. S

    Network Printer Status

    It may be a the way the spooler driver reports to the subsystem and then getting interpreted by the code. Try setting the default printer to Microsoft XPS Document Writer. Set up a Do Events Loop to throw a message when it's status changes. Then print a document to it. Hopefully it will...
  3. S

    refreshing tables in excel

    It does depend on how the SQL server has been setup. If it is in native SQL then passwords are needed. Firstly check with the DB admins. If the SQL server is in mixed mode, addition to a group with access to the sql db will remove the need for password. It maybe that your sql connection string...
  4. S

    search subform

    If the tables are related for example, customerid with a related customerid in the orders table. I would expect to see a relation as all orders should have a related customer. You would rarely see an order with no related customer. If the links exist, then the results should show customers...
  5. S

    SendObject Stuck in Outbox

    The Set obmsg might create a 'draft' I would use this and not the docmd statement, ie keep the with statement and comment out the docmd bit Steve
  6. S

    Please Help w/ Access automated timed merge

    It is possible, it will all be based on a query of when the last contact was. The problem with automating outlook especially in a business is that VBA is often used to hijack and use email programs such as outlook to read address books and send out spam. Any responsible network admin would...
  7. S

    Network Printer Status

    WMI may be your answer You will need to set a reference to Windows Script Host Model Dim strComputer Dim objWMIService As Object strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters =...
  8. S

    Sending email from Access query result VBA Outlok to different group of customers

    The chances are is that if your email application is corporate, then security settings will stop email being automated from an external application. (basically this stops viruses attacking your email client) You could always do it in reverse. Create the code in Outlook and pull the data from...
  9. S

    Delete zeros in Excel...

    Replace(.Range("D6"),"0","") Dirty but has worked for me in the past. However, I normally do it by cell reference. Hope this helps Steve
  10. S

    Help with Creating and Using Temporary Recordset to Delete Unwanted Records

    Cascade deletes basically ensures that when you delete a parent record all the children are deleted. If you delete all child records, the parent will still remain. It is only the parent deletion that deletes all children As long as this is what you intend to do across all records, then this...
  11. S

    Listbox

    ahhh bingo I tried this, but must have had blurry eyes. I think I did .additem ("4";"April") I then went off on a tangent and tried everything, I could think of. It made it worse as I couldn't use set the recordsource to a recordset. cheers Steve
  12. S

    Loop through query

    So you are opening a report based on a value in a field. I'm not what your rs is doing, but it does not seem right. Once you open a recordset you do not need to loop through it, a form or report can have its recordsource set to the value of the query. I assume you are opening the report when...
  13. S

    Run Time error - 2147467259 (80004005)

    Surely is it not easier to test for if rst.absoluteposition = rst.recordcount - 1 then Basically you have forgotten to add the minius one at the end. Basically checking before you fall off the end of the last record. Does that sound ok Steve blah blah
  14. S

    Paste appending from Excel file into Access table

    If you want to be fancy you could also read the spreadsheet line by line Dim rst1 As New ADODB.Recordset Dim strsql As String dim i as integer strsql = " select * from tblname" rst1.Open strsql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic i = 1 (or the row where the data...
  15. S

    Help with Creating and Using Temporary Recordset to Delete Unwanted Records

    If you have the relationship set to cascade deletes, then when you delete the parent record the child record should autodelete due to cascades. so try strWhere = me.controlonform docmd.runsql "DELETE * FROM table1 WHERE nameoffieldintable ='" & strWhere & "'" note that the quotes after the...
Top Bottom