Search results

  1. J

    SQL problem

    3. The problem is that when you use an aggregate function in the SELECT (e.g. COUNT, MAX, MIN, etc.) you need to use a GROUP BY if you have other fields in the SELECT. That means instead of DISTINCT, you need to have a GROUP BY that contains all the other fields in the SELECT that are not in...
  2. J

    SQL problem

    Public Function getBoxContent() oDB.Execute "DELETE * FROM counted", dbFailOnError sQry = "INSERT INTO counted ( Family, Infra, box, collection, Specimens ) " _ & " SELECT DISTINCT A.Family, A.infra, A.BoxNo, A.Collection, Count(A.BoxNo) AS count " _ & " FROM boxes...
  3. J

    Enhancing a small form

    How? According to all I have read, the only way to have a coloured image on a button is to use a "Shared" image, not embedded. I have tried jpg and bmp with the same result. If you use this on a form with a number of controls, the flicker when mousing over is unacceptable. John
  4. J

    Enhancing a small form

    Over the years I have received much needed help from many on this forum, so now it is my turn. This might be an old trick but I put it here anyway. To turn an ordinary form into something a bit more professional looking, I have simply placed a command button over the entire form. Set the button...
  5. J

    Unable to reduce form's detail size

    So Simple. Ta muchly.
  6. J

    Unable to reduce form's detail size

    This is best explained in pictures, see below. I have a simple form with two buttons. I would like the form to encompass the buttons but not spread out over the page. The screen shots represent my latest attempts to correct this problem. I am running Access 2016 on windows 11. This is what I...
  7. J

    Solved Afterupdate with no update.

    FWIW, here is the sub. Called from the current control's gotfocus event with "isanythingthere me, me.nameofnextcontrol" Public Sub isAnyThingThere(frm As Form, ctlNext As Control) Dim ctl As Control Set ctl = frm.ActiveControl With frm .Controls(ctl.Name).BackColor =...
  8. J

    Solved Afterupdate with no update.

    NO, Doc_man. The controls are placed top to bottom and the auto tab goes left to right. I have solved the problem using the gotfocus event Private Sub cboFlower_GotFocus() Me.cboFlower.BackColor = TempVars!colouron If Nz(Me.cboFlower.ItemData(0), "") = "" Or Nz(Me.cboFlower, "") > ""...
  9. J

    Solved Afterupdate with no update.

    Hi Ken. That is the simplest method but we're not working with people who are very adaptable. They will click on every control and expect it to go to the next. I have actually taught them to not use tab because the tab order is not always the next control. Some of the forms have 90 odd controls...
  10. J

    Solved Afterupdate with no update.

    That didn't work because the focus changes when you release the mouse button on the dropdown arrow. You don't get to see the dropdown or select an item.
  11. J

    Solved Afterupdate with no update.

    Thank you all. I finished up using the mouseup event. Obviously the mouse down event works equally well but feels a bit too instantaneous. John
  12. J

    Solved Afterupdate with no update.

    This is probably a dumb question, but I have a combo box that gets focus with the correct data. When I click on the combo box there is no response from the "afterupdate" or "onclick" events. How do I get focus to move to the next control?
  13. J

    Table view problem

    1) I need to open the files during their construction. It helps me see if the sql strings are doing there thing. 2) This behaviour happens on un-indexed and unfiltered files. I didn't get a chance to test at the uni today, so no results there. John
  14. J

    Table view problem

    I have the system running on 10 and 11 at the uni so will do a few tests tomorrow. Watch this space!
  15. J

    Table view problem

    I only have one machine with MS Office, so unable to test here but I can test it at the Uni tomorrow. The drivers are probably standard windows drivers, I have never had cause to question them and I am using Windows Defender as my only AV software. Re the CPU update. All this hoo haa about...
  16. J

    Table view problem

    Lots to ponder here. I only use CR on close, on my development environment.. My live software is all accde and the backend is backed up after every use. I do have a mouse issue when the batteries are a bit low but that is mainly erratic movement and I have just replaced them without affecting...
  17. J

    Table view problem

    1} No. 2) The test accdb is regularly replaced with the active file, although I don't delete one and paste in the other. The behaviour has persisted over multiple copies of the accdb. I have to replace my very old cpu with one compatible with W11. I'll see if that makes a difference when the...
  18. J

    Table view problem

    I do a compact and repair on close so corruption is unlikely. Also everything else is working as expected. It just starts for no apparent reason and sometimes just stops doing it. Usually restarting Access fixes it for a while. Just a nuisance really, especially when trying to sort a field.
  19. J

    Table view problem

    From time to time, in table view. I get this strange behaviour. I am running Access 2019 and still on W10. First image, Open table view. The first field is already highlighted. Second image, select "Main_Family". All fields to the left are highlighted. Third image, select record 107. All...
  20. J

    field variables in sql string

    Thanks for that. My only observation is that "as_date" and "as_String" rely on a "Null" value but don't consider an empty string. Maybe "NZ()" rather than "isNull" would make them more reliable. Function As_text(cur_text As Variant, Optional on_null As String) As String If nz(cur_text,"")=""...
Back
Top Bottom