Search results

  1. MajP

    Solved Requery underlying form, but retain bookmark

    What is your point? Great, you have code that sometimes works. What you going to do with that? That is the worst kind of bug, one that fails sometimes. Really hard to debug those types of errors. Read post 50 under specific conditions where it could work. But as everyone pointed out this is...
  2. MajP

    How to replace the domain function in MS Access VBA

    In the DSUMS you can do this in one recordset for the majority. ' Company.Add "taxblAmtA", Nz(Round(DSum("TaxableValue", "QryJson", "[InvoiceID] =" & Me.txtJsonReceived & "And [TaxClassA] = 'A'"), 4), 0) ' Company.Add "taxblAmtB", Nz(Round(DSum("TaxableValue", "QryJson"...
  3. MajP

    How to replace the domain function in MS Access VBA

    @June7 Sorry was doing this on my phone and could not see. You can still get it down to a 2 or 3 recordsets. For the dlookup, it should be simple to do one. Dim strSql As String Dim rs As DAO.Database 'Define variables Dim ItemCD As Long...
  4. MajP

    How to replace the domain function in MS Access VBA

    That opens only 2 recordsets. You are opening a recordset with each domain.
  5. MajP

    How to replace the domain function in MS Access VBA

    Make a new aggregate query that sums all of those values. Open it and assign a bunch of variables to those values that currently use drum. Open qyjson as recordet with your where condition. Save all those dlookups as variables. Use your variables.
  6. MajP

    No need for table fields on a form

    I would be interested in you or someone else citing an example, because that is untrue as far as the application. There may be "confusion" but Access is not "ambiguous" . Any issue would be purely a user issue and have nothing to do with Access. The user might be confused what they are doing...
  7. MajP

    Solved Requery underlying form, but retain bookmark

    Actually that keyed me to the reason. The reason you still see it is because at one time it was the only method. Prior to AC 2000 there was only a recordsetclone and no recordset property. It was synched via the forms bookmark. So that was the required way to do it and has become habit.
  8. MajP

    No need for table fields on a form

    Are you saying there are cases where even using bang notation will fail without a control on the form? I understand there are cases where compile time Dot notation will not work without a control on a form, but the run time bang always seems to works without a control far as I know. If so can...
  9. MajP

    No need for table fields on a form

    I do not get the example either. It sounds as @Cotswold discovered something that is not an issue. I guess the bigger question is why did you believe you had to add the controls in the first place I do not get it because I see people do this all the time with people adding tons of hidden...
  10. MajP

    Joining a table where the records are stored within a column separated by a comma

    Unfortunately the data does not come to the OP in that format. The OP only gets the totals.
  11. MajP

    Joining a table where the records are stored within a column separated by a comma

    There is no need to. Main table has Region Total Sales Child table has Region PostCode You can link Main Table to child table using Region. Make Region the PK in the Main table and the foreign key in the child table.
  12. MajP

    Joining a table where the records are stored within a column separated by a comma

    So I asked Chat to do this. Public Sub PopulatePostCodes()Dim db As DAO.Database Dim rsSource As DAO.Recordset Dim rsTarget As DAO.Recordset Dim vCodes As Variant Dim i As Long Dim strCode As String Set db=CurrentDb Set...
  13. MajP

    Joining a table where the records are stored within a column separated by a comma

    Good question. Is that just a text field with commas or is it a MVF? I assume it is not an MVF because you would be able to query it just like any other query. If it is a simple text field you could easily write code (or simply have Chat do it) that would normalize your data by creating a...
  14. MajP

    Solved Requery underlying form, but retain bookmark

    My understanding is that it may work but it is not guaranteed. I have no idea why, so I asked Chat. Now I am not sure how much of this is truly accurate but here is the answer so take it for what it is worth. Short answer: it can work, but it’s not inherently “safe” unless you handle a few...
  15. MajP

    Solved Requery underlying form, but retain bookmark

    I see people use that a lot. Since that seems more complicated and since you posted it I assume there is some kind of advantage. I have no idea what that is. What is the advantage of that over this? Private Sub Form_AfterUpdate() Dim lngID As Long lngID = Me.TransactionID...
  16. MajP

    Solved Requery underlying form, but retain bookmark

    That is not a true statement, bookmarks can never match again. A Bookmark is an internal pointer that uniquely identifies a specific row within that exact INSTANCE of a recordset. Kind of like a memory address or a row handle. It is not a value you can interpret or reuse across different...
  17. MajP

    Solved Requery underlying form, but retain bookmark

    Now I reread the thread and of course this was covered, and in fact it was me. I would not resurrect this thread because this is one of the stupidest threads I have ever read. The OP seemed to be trolling.
  18. MajP

    Solved Requery underlying form, but retain bookmark

    Bookmarks are recordset specific pointers so if you requery those bookmarks are invalid. So that error is expected and guaranteed. I did not read the entire 3 year old thread but assume this is fully covered. On easy way is to first save the primary key of the current record, then requery...
  19. MajP

    Selecting files & folders in a textbox form by dragging them from Windows Explorer.

    I did not look at your solution yet but some ActiveX controls support this Post in thread 'File Attachement Field' https://www.access-programmers.co.uk/forums/threads/file-attachement-field.334511/post-1972302
  20. MajP

    MS Access Outlook Style Calendar

    FYI, I have tried to put as many Calendars and date pickers into one thread. I will add these new ones. @Peter Hibbs . Yours has been referenced directly in that thread already. If the version is different I will replace with this one...
Back
Top Bottom