Search results

  1. MattBaldry

    Solved Delete Query

    I am doing this at the moment, but it is still slow, and with this may records I need to run the query so many times, which is why I was hoping I could get Access to loop it for me. I could then set it on another machine and let it loose for me. ~Matt
  2. MattBaldry

    Solved Delete Query

    Hi ebs17, Please see code below. DELETE dbo_StockRecordAuditLog.StockRecordAuditLogID, dbo_StockRecordAuditLog.StockRecordID, dbo_StockRecordAuditLog.Username, dbo_StockRecordAuditLog.Action, dbo_StockRecordAuditLog.ActionDateTime FROM dbo_StockRecordAuditLog WHERE...
  3. MattBaldry

    Solved Delete Query

    Hi All, I have a query to delete certain records from a link SQL table, but there are a lot (over 300k). Is there any way of creating a query to loop delete 100 records at a time so it doesn't get hung up trying to delete them all in one go? ~Matt
  4. MattBaldry

    AutoExpand on ComboBox seems broken

    For our use, we have some fields that have similar entries, but with lots of characters. This saves the single finger typists from having to put it all in. They can start and now it does start to filter by what they have typed so far. Before it had nothing so you had to type the entire text in...
  5. MattBaldry

    AutoExpand on ComboBox seems broken

    Updated to a public function which also seems to work nicely. Public Function funDropdown() On Error GoTo ErrorHandler Screen.ActiveControl.Dropdown ExitSub: Exit Function ErrorHandler: MsgBox Error$ Resume ExitSub End Function
  6. MattBaldry

    AutoExpand on ComboBox seems broken

    I have had this issue and posted a while back, and have since been using the below code in the Got Focus of the combo box. It is not ideal, but it does then allow the AutoFill to work. (where cboBoxName is your combo box name) Private Sub cboBoxName_GotFocus() Me!cboBoxName.Dropdown...
  7. MattBaldry

    Fixed Form Position no Overlaps

    Yes, I like this idea. I will have a look into this as it may work for me. ~Matt
  8. MattBaldry

    Fixed Form Position no Overlaps

    Hi All, Is there a way of making a form with a fixed position but not allowing any other forms to over/underlap it? I wanted to have a left sided menu for my modules, and when one is selected a custom ribbon is then loaded. I know a fixed position can be done, but wasn't sure if I could then...
  9. MattBaldry

    Solved Insert Query vs VBA Code

    Hi CJ, I normally have my listboxes/combo boxes row source as a pre-made query. Would your method be a better option for me to learn? ~Matt
  10. MattBaldry

    Solved Insert Query vs VBA Code

    Thank you for your comments. This one for me is more about my own preference than down to speed. I wanted to learn the VBA side of it instead of me taking the "easy way" and creating the query and calling it. I have changed to the CurrentDb.Execute strSQL rather than DoCmd.RunSQL strSQL though...
  11. MattBaldry

    Solved Insert Query vs VBA Code

    Thank you for your feedback. I think I am going to move to the VBA method. I want to reduce the number of objects in my DBs and this will be a decent start. ~Matt
  12. MattBaldry

    Solved Insert Query vs VBA Code

    Hi all, I have always used a method of creating an insert query and then calling this with VBA when I need to add data to a table. DoCmd.SetWarnings False DoCmd.OpenQuery "qryInsertReturnAction", acViewNormal, acEdit DoCmd.SetWarnings True Is there any benefit to changing this to have the SQL...
  13. MattBaldry

    Print File to Specific Printer

    Hi Sonic8, I haven't had a chance to work on it properly. I will work on getting it to print first, then sort the printer issue out. I will keep you updated :) ~Matt
  14. MattBaldry

    Print File to Specific Printer

    Thanks sonic8, For my system they will always be pdf and Adobe reader will always be present. Understand the others may be different, hoping that mine will be easier. The printer is shared and the same name on all clients, all clients have Adobe Reader present. The main issue with this would...
  15. MattBaldry

    Print File to Specific Printer

    Hi arnelgp, I have found your old code below, but need to find a way of setting the printer this needs to output to. Public Sub PrintAnyDocument(ByVal strPathFile As String) Dim TargetFolder Dim FileName Dim ObjShell As Object Dim ObjFolder As Object Dim ObjItem As Object...
  16. MattBaldry

    Print File to Specific Printer

    Hi Arnelgp, Sorry, I think I worded it wrong. I don't want to open the print dialog. I want the VBA code to decide on the printer. I want the user to be able to double click the list box and it will print the selected PDF to the printer set in the VBA. Please note, this is an external file...
  17. MattBaldry

    Print File to Specific Printer

    Hi All, I have just finished a form the allows me to open saved pdf files and it works great. Is there simple code to direct print these to a specific printer? I have looked but lost the link that I found that I thought would do it and cannot find it anymore. ~Matt
  18. MattBaldry

    Query Get Latest Date

    Hi All, I have what should be a simple query, but I cannot get it to work right. I have a table with a DrawingRevisionID (PK, AutoNumber) and DrawingRevisionDate. I want to be able to only show the latest date, but also need to show the PK which may not be the latest number. As an example I...
  19. MattBaldry

    Solved Open Set Folder to Select File

    Perfect. Dim f As Object Dim strDocumentFileName As String Dim varItem As Variant Dim strStartFolder As String strStartFolder = "\\sc-nas-01\XP-Share\Production & Shop Floor\Drawing Register\Cable Assemblys\" & Forms!frmProductBOM!ProductCode Set f =...
  20. MattBaldry

    Solved Open Set Folder to Select File

    Hi all, I have the below code to select a file and save the location to a table. Dim f As Object Dim strDocumentFileName As String Dim varItem As Variant Set f = Application.FileDialog(3) f.AllowMultiSelect = False If f.Show Then For Each varItem In...
Back
Top Bottom