Search results

  1. MajP

    Continuous form scrolls to top. Can I prevent this?

    FYI, I had to check this in chat because I would not think it would do anything so I am suprised it worked at all. So it should not go to that record and should not cause a requery.
  2. MajP

    Continuous form scrolls to top. Can I prevent this?

    That code is usually to open a new form. As you describe it, it sounds like you have a main form, with one or two subforms on it. Is this a split form where the main form is the details and the subform is a list. If you click in the list you see the details. If so then the code should be...
  3. MajP

    Large .accdb gets corrupted

    I am not sure what that means. I interpret that to mean that after you C&R the corrupted backend you lose some features in the front end? That seems strange and I can only guess that the backend is still corrupted but to a lesser extent. Can you explain the features that you lose? I have never...
  4. MajP

    Continuous form scrolls to top. Can I prevent this?

    It might still be worthwhile to see your button code and then we can see if there is something that may cause this under certain conditions.
  5. MajP

    Continuous form scrolls to top. Can I prevent this?

    Can you provide the code behind the button to do this. If you click on a record in the subform and that code move to the details in the main form for that record. the subform should stay in place unless you have code that moves it away. This could be done if you have something like a requery in...
  6. MajP

    Table Design and Efficiency Help

    If you are going that route why not get rid of all the reference tables and make a single table Make tblProperties -- PropertyID -- PropertyTypeID -- PropertyName Now you can enforce RI and simplify the UI. However, I do not think I would recommend this approach to novices unless I envision a...
  7. MajP

    Form Instance Example

    You can support it, but I would say you cannot really "manage" it. You can simply keep the instance open without an external means to hold the reference. To me "manage", means you have a way to reference one of the specific open instances. That is demonstrated here. I can close the instance...
  8. MajP

    Form Instance Example

    For those who have never worked with multiple form instances, here is a good example of how multiple form instances can have utility. It shows you one way you can manage the instances externally by opening and closing them from using the multi select listbox. Usually you would use something...
  9. MajP

    Closing Form Instances

    Yes I was confused because you showed this in your original and not the event procedure you put in the example. Public Sub CloseMe() Set me_ = nothing End Sub Since the original thread seemed to be referring to closing instances external from the form, I was trying to understand how you...
  10. MajP

    Closing Form Instances

    @MarkK, I am trying to see a case where that would be useful. Most of the time you use form instances you open a variable amount of instances. You use a collection or an array that is dynamic instead of a set variable for each instance. So how would you call closeMe without defining a...
  11. MajP

    Form with subform in transaction

    @arnelgp demonstrates rolling back a parent and child here in a transaction. https://www.access-programmers.co.uk/forums/threads/prevent-ms-access-to-autosave-data.325707/post-1854876 But I have never heard anyone try to do this in a production DB because of all the potential issues as described...
  12. MajP

    Full rebuild; migrating old tables and lots of other fun stuff. General pointers requested.

    I would recommend that you have a field in every new Table called "OldPK". Then you can save what the old Primary key was. So when you create a parent table you can then update the child table foreign keys to the new primary key based on the oldPK. If you do not do this it will be extremely...
  13. MajP

    Match the primary Key in the Main form to the foreign key in the Subform

    What you were trying highlights several other learning points 1. As mentioned do not store calculated data for many reasons. It is so easy to get out of synch from the true value. You have to make sure every change in the data reflects in the calculation. If you are doing a roll up then every...
  14. MajP

    Query with multiple parameters but don't bring up duplicate rows?

    Here is a form demo with the concat and search in one. This is basically the same approach as Ken's just packaged differently. If you search for both Plumbing and HVAC If you want either plumbing or hvac
  15. MajP

    Query with multiple parameters but don't bring up duplicate rows?

    To be clear you want to search for companies meeting more than one criteria. For example return all distinct companies that do both HVAC and Plumbing? You can do that in a query but to build a search form to do that you will likely have to generate the sql string in code. I assume you would...
  16. MajP

    Solved Query to find users not currently assigned to equipment

    I think if you went with the left join suggestion it would need to add the inner join to equipment. Something like. SELECT * FROM qryActiveUsers as t1 LEFT JOIN (SELECT UserID FROM tblAssignedUsers WHERE equipmmentID = [forms]![mainform]![equipID) AS...
  17. MajP

    Solved Query to find users not currently assigned to equipment

    @CJ_London, I do not think that gives you anything. TblAssignedExaminers is a juntion table with UserID and EquipmentID. That will give you users without any equipment not users who are not assigned to a specific piece of equipment.
  18. MajP

    Solved Query to find users not currently assigned to equipment

    Because we do not see the real tables I will assume you can make the query qryActiveUsers which returns something like UserID,EmployeeFirstName, EmployeeLastName, EmployeeID .... Something like this if the main form is the equipment Select * from qryActiveUsers where UserID Not in (Select...
  19. MajP

    ow to print a tree view

    Thanks. Was not familiar with that. I will edit my post.
  20. MajP

    ow to print a tree view

    A treeview is an ActiveX control in the MSCOMCTL library. Similar to when we call the subform control and the form inside the subform control a "sub form". Even though two different things. There is the treeview activeX control of class (Access.CustomControl) and then the treeview object...
Back
Top Bottom