Search results

  1. W

    Help with SQL statement

    I have the following SQL generate a query. SELECT * FROM RecallLetters WHERE (((RecallLetters.[Due Date]) Like "*/*/2017" Or (RecallLetters.[Due Date]) Like "*/*/2016" Or (RecallLetters.[Due Date]) Like "*/*/2015") AND ((RecallLetters.PartAdd) In (SELECT [PartAdd] FROM [RecallLetters] As Tmp...
  2. W

    Use info from settings table in a report

    Tanks all. There is no relationship between the tables. Dlookup did the trick.
  3. W

    Use info from settings table in a report

    I have a main table and a settings table. The settings table only has 1 id number and a few data fields and updated on an annual basis. I generate reports using a query on the main table but want to add in some of the data from the settings table. I am struggling with how to link the tables or...
  4. W

    Print a created publisher document using vba

    Well I managed to sort a workaround. I simply save the the publisher document I have created. I have created a duplicate of my printer and set it up boarderless and the correct paper tray. I then use command line to set this as default printer and the print the publisher doc. Command line 1 VBA...
  5. W

    Closing publisher document windows 10 office 2016

    I don't know why it is doing this. In windows 7 it works perfectly. I have tried all iterations of close and quit etc. With windows 10 I always end up with a blank page in an still open publisher window. I may try and see if there is any microsoft support for this, but at least I have a work...
  6. W

    Closing publisher document windows 10 office 2016

    Ok I'm closing it down normally. With Windows 10 this leaves me with a blank document in an open publisher window. If running windows 10 I then use: Call Shell("taskkill /f /im mspub.exe")
  7. W

    Define printer prefs in document, then open it from access and print

    Is it possible to set the vba on open document of a word or publisher document to define printer preferences, open the document with early or late binding in access, edit it and then just print it, but have it use the vba in the actual document to select printer rather than trying to do it in...
  8. W

    Closing publisher document windows 10 office 2016

    Thanks for that I tried it but it fails with compile error. I did have a dabble with late binding when I was running office 2013 and 2016 concurrently. My reference libraries kept update when I opened and saved the files in 2016 rendering them incompatible with 2013. After a lot of effort I...
  9. W

    Closing publisher document windows 10 office 2016

    Having created a publisher document object using: Dim appPub As Publisher.Application Dim pubDoc As Publisher.Document Dim pubShape As Publisher.Shape Set appPub = New Publisher.Application Set pubDoc = appPub.Open(MyDoc) I use the following code to close it: pubDoc.Close appPub.Quit Set...
  10. W

    Print a created publisher document using vba

    I can create a publisher document and add info: Dim appPub As Publisher.Application Dim pubDoc As Publisher.Document Dim pubShape As Publisher.Shape Set appPub = New Publisher.Application Set pubDoc = appPub.Open(MydocTemp) On Error Resume Next pubDoc.Pages(1).Shapes("Text Box...
  11. W

    Help with speeding up code that reads data from excel

    I use the following code to populate a list box with available appointments from an excel spreadsheet. The line within the spreadsheet it starts from is stored in a setting table and is updated by the code each time it runs, so it doesn’t go over past appointments. I also try to keep the excel...
  12. W

    Printing issues with report and selecting printer

    Can anyone help with this? I don't understand why it works fine if the report isn't hidden, but messes up if it is.
  13. W

    Printing issues with report and selecting printer

    The following is part of a piece of code to print a report. I use the code elsewhere for other reports and it works fine with the acHidden (in bold) bit in. In this case if the acHidden bit is not commented out it ignores the paper tray and tries to print a tabular of all the records in the...
  14. W

    Auto select which scanner for WIA in VBA

    Ok I can create a vbs script and use shell to run it just before the: Set wiaScanner = wiaDialog.ShowSelectDevice So I can use sendkeys. However is there a more elegant way?
  15. W

    Auto select which scanner for WIA in VBA

    I have managed to obtain the device ID's. I just need a way to modify so the scanner is selected automatically e.g. Set wiaScanner.DeviceID = "#############" However it errors as it is a read only property.
  16. W

    Order addresses so 2,3,4... is before 10 etc

    Val() certainly looks interesting. I will have to have a play.
  17. W

    Order addresses so 2,3,4... is before 10 etc

    I use the following code to reorganize an address list: pvarArray() = Split(addlist, "^") Dim p As Long Dim iMin As Long Dim iMax As Long Dim varSwap As Variant Dim blnSwapped As Boolean iMin = LBound(pvarArray) iMax = UBound(pvarArray) - 1 Do...
  18. W

    Auto select which scanner for WIA in VBA

    I still haven't found a solution to this. It occurs with the following line of code: Set wiaScanner = wiaDialog.ShowSelectDevice I can't even use sendkeys as vba stops while it waits for you to choose. When I only had one scanner installed it never showed the dialog.
  19. W

    Retrieve paperbin info - I can't get this code to work

    Well it's a good job I got that code working. The other day knowing 1 and 2 correspond to tray 1 and tray 2 for my Brother MFC-J5720DW Printer, I tried to find out the MP Tray code by trying values 3-15 for paperbin. None of these worked so I was going to try a few more values going upwards. I...
  20. W

    Retrieve paperbin info - I can't get this code to work

    That database works fine. I have just been having a look at the code and I think I am meant to pass the device name to the procedure for the paperbin. I think that may be where my issue lies. I only tested it quickly so didn't realize. EDIT: And we have a winner. How stupid am i?
Back
Top Bottom