Search results

  1. M

    Search Excel spreadsheet with string from Access form

    Thanks - I understand better. With this (also making explicit my search string). I get the same 'Error 91; Object variable or With block variable not set' With Xlsheet .Cells.Find(What:="1434", After:=.Cells("A2"), LookIn:=xlvalues, LookAt:=xlPart, SearchOrder:=xlByRows...
  2. M

    Search Excel spreadsheet with string from Access form

    Thanks Eberhard Please can you be more explicit? I should be adding a reference to the parent of what ? thanks again Matt
  3. M

    Search Excel spreadsheet with string from Access form

    I have now bracketed "filename" and with a bit of tweaking my declarations I have the following, which results in the spreadsheet not opening, and an error message; With this code Private Sub Command132_Click() On Error GoTo Err_Command132_Click Dim filename As String Dim searchstring As...
  4. M

    Search Excel spreadsheet with string from Access form

    Thanks for this Darrell, I've had a go. In access vba, this line Set XlBook = xlTmp.Workbooks.Open filename gets highlighted red with a 'Compile error: Syntax error message.' if I take out that line and replace with the previous xlTmp.Workbooks.Open filename the file opens, but I get 'Object...
  5. M

    Search Excel spreadsheet with string from Access form

    I'd also really like to close any instances of the open Excel file on the machine that this event is being run from, before opening and running the search if anyone can help with that. thanks
  6. M

    Search Excel spreadsheet with string from Access form

    Thanks for input. I added that line in, and but the error message remains 'Run time error '9': Subscript out of range.
  7. M

    Search Excel spreadsheet with string from Access form

    No, I'm wrong, it was because the spreadsheet had saved with that cell as focus - and I had just entered a dummy value to search for, doh. The search is not running at all.
  8. M

    Search Excel spreadsheet with string from Access form

    However, the search is working as the cell immediately after a cell I am looking for, is the focus when the spreadsheet opens. The error msg is now: 'Run time error '9': Subscript out of range. More progress.
  9. M

    Search Excel spreadsheet with string from Access form

    xlTmp.ActiveSheet.Cells.Find(What:=searchstring, After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext).Activate
  10. M

    Search Excel spreadsheet with string from Access form

    Thanks for heads up theDBguy. I now have Private Sub Command132_Click() On Error GoTo Err_Command132_Click Dim filename As String Dim searchstring As String Dim Xlsh As Excel.Worksheet Dim xlValues As Variant Dim xlTmp As Excel.Application Dim xlPart As Variant Dim xlByRows As Variant Dim...
  11. M

    Search Excel spreadsheet with string from Access form

    Hi folks. I am trying to make a link between an Access form, and an Excel spreadsheet so that a user can open the spreadsheet with a button click, and initiate the Excel 'Find' function to take them to the cell containing a string lifted from form control. I need the search to run across sheets...
  12. M

    Picking up file created date from browse event

    thanks, I'll give it a go Matt
  13. M

    Picking up file created date from browse event

    Thanks for this Colin. I like the way you've used the ListtoTable functions this way. I have several old nightly routines that run the Allen Browne functions from batch files to build file lists, and I hadn't thought of using them On Click, reverting instead to Command Line Dos or PowerShell...
  14. M

    Picking up file created date from browse event

    Dear all, I am using the below, on a click event to link images to records, and the code works fine. Private Sub Command5_Click() Dim f As Object Dim strFile As String Dim strFolder As String Dim strFolderlo As String Dim varItem As Variant Set f =...
  15. M

    Looking for advice on migrating to Cloud

    Hi folks, I work in an organisation where I have developed dozens of Access databases over the last 18 years or so most of which remain in operation and many are core to our daily operation. The time has come to really push to move the back ends from the standard network storage on which they...
  16. M

    Complex query - readonly recordset workaround

    Ah thanks for replies, yes I will try a separate form on a pop up. DBGuy - sorry for "it isn't working" as I appreciate that that is so useless (although Pat understood...). No there is no error, the form simply opens as it would otherwise do according to the arguments built into 'On Open'...
  17. M

    Complex query - readonly recordset workaround

    Thanks for this. So I think I'm going to close the form and reopen on the same record. As I am closing the form that has become readonly due to the underlying recordset, I need to trap the PrivID and use that to reopen the form with. So this is what I have Private Sub Command200_Click() Dim...
  18. M

    Complex query - readonly recordset workaround

    ...well anything is possible but the data is generated from bank statements and pay in slip details that fly in from other sources, and I'm not going to start redesigning that element of the relational database to eliminate 1 table. But thanks for the advice.
  19. M

    Complex query - readonly recordset workaround

    Thanks again. Yes lets assume my form is bound to "T_Membership_details". In order to only show "PrivID" in the query result, somewhere I am going to need to give "Q_CY_Not_Paid" as the source.
  20. M

    Complex query - readonly recordset workaround

    Thanks for this. So what is the VB for this? My key is "PrivID" and will appear in all tables and queries that relate to individual membership records. I want to only show records in "T_Membership_details" where "PrivID" = "Q_CY_notPaid.PrivID" cheers Matt
Back
Top Bottom