Recent content by MajP

  1. MajP

    Finding the record with the maximum value in a query

    No that is not what George said. The autonumber will reflect the "sequence in which the rows were inserted", but the order in which they were inserted may not be the order in which they should have been entered. They could get entered out of order. So this is not a solution to his example. He...
  2. MajP

    The Death of ActiveX: How to Build a CRUD Tree of Accounts in MS Access WITH MCP

    I am not sure if this is much new here. Here are several examples of doing the same thing from different people that use a listbox to fake a treeview. @CJ_London proposes another interesting approach using an ADO recordset and continuous form. There are many others out there...
  3. MajP

    Finding the record with the maximum value in a query

    As I pointed out it is unclear, but it appears that the OP wants the record with the greatest ID not the value of the greatest ID
  4. MajP

    Finding the record with the maximum value in a query

    you can use the Top X predicate Select Top 1 * from sometable order by ContactID Desc This returns the last record. You could query on the max Select * from someTable where ContactID = dmax("ContactID","SomeTable") But you ask 2 different things. You want the most recent record Or do you...
  5. MajP

    TreeviewForm imperfection, or by design?

    I looked at the example and it is acting as expected. It needs a line of code to make it work. If you need this solution then you can simply do a full load and it will work. If you need a solution that allows you to do a light load but still mark all descendants then simply modify the code to...
  6. MajP

    TreeviewForm imperfection, or by design?

    That would do it because in the light load not all the descendants are loaded. Only enough to show the expander icons. So that is just offspring for that visible level. I could write additional code to check and overcome this condition. It would first expand all levels below the selected...
  7. MajP

    Add a pattern of sequential numbers to a query

    Assuming you do not always have equal groups you would want to make sure that employee x is not always getting the remainder so you would want to assign them each time in a different order. Public Sub AssignRandom() Dim EmployeeCount As Integer Dim CityCount As Integer Dim...
  8. MajP

    Add a pattern of sequential numbers to a query

    Are you open to a code suggestion where you push the results into a temp table. The reason is you can do a query that pulls a random number between 1 and N, but that will assign the assignments randomly, but not ensure that the groups are as equal as possible. They may be close to equal but not...
  9. MajP

    Report.FilterOn is not working

    Yes, but only in print Preview and not in FormView You can set the filter in onopen, but you need to turn the filter on in the onload event. Or simply do everything in the onload and it works in formview and print preview. I agree not sure why you would want to set the filter in the load event...
  10. MajP

    Report.FilterOn is not working

    No difference. The issue is that the filteron must be moved to the onload. The filter will be applied in the on open but for some reason it is to early to set filter on in the onopen and must be set later in the onload.
  11. MajP

    Report.FilterOn is not working

    The reason this does not work is because you are opening the form in Report View and setting the filterOn in the on open event. I do not fully understand why this is, but if you set the filteron in the open event that event it too early to "stick". Many work arounds but the simplest is just...
  12. MajP

    Filtering between Forms.

    I am assuming that the combo is unbound, and that it is not linked to the subform. So what code exists now in the combo to navigate to a new record? I would assume you need something like this in the combo after update if not IsNull(Me.SearchComboName) then Me.filter = "someFieldID = " &...
  13. MajP

    Solved Properties not appearing in 2016

    The properties window is slidable. Check that it is not slid shut. That is why you are likely seeing a flicker, but no window. It is opening but "minimized" shut.
  14. MajP

    Forms not refreshing when navigating between them

    That does not do a repaint of the "database screen". That is referring to this window As stated it is to refresh objects in that window that have been added, renamed, or removed via code.
  15. MajP

    Forms not refreshing when navigating between them

    I believe you mean it is not "repainting" the form. Refreshing is updating the data on the screen. You could try forcing a form.repaint, but you might be chasing the real issue. Try creating a new database and importing everything into that. If that fails you can try a database decompile...
Back
Top Bottom