Search results

  1. J

    Solved Variable in HAVING clause

    I've never really got into debug.print but I do frequently use msgbox as a debugging tool. In the case of an sql string, however, the cause of the error is often a bit vague. In this particular case the error messages were just a little above useless. As for running on data, I never run...
  2. J

    Solved Variable in HAVING clause

    Point taken. I wasn't considering the sql string as a whole, but just that particular part of it.
  3. J

    Solved Variable in HAVING clause

    Hi. I'm not building a string, I'm restricting the result to a particular part of a field. In this case "Collection", in another case "Parks" hence the variable. Regarding the '0', I agree this should not work, but it does, or appears to. If I remove the quotations the sql string errors.. I...
  4. J

    Solved Variable in HAVING clause

    I enclosed the sTable in " & sTable & ". Now it works.
  5. J

    Solved Variable in HAVING clause

    I know this is an old beast but none of my reading, or various attempts, has set me on the right path. In the code below sTable is passed in from the calling sub but is not recognised by the SQL statement. Replacing the variable with a string, "Collection" in this case causes the SQL to run. I...
  6. J

    How to make MS Access looks like real Application

    For what it's worth, I run my accde files from a shortcut with the window minimised. All you see is the currently opened form.
  7. J

    How do I delete Access lock files?

    If you first remove the files to another folder then there is nothing to lose. My copy of access died with with files open. This was the only way I could clear the lock file. The files in question were development files but the folder also housed accde test files and a copy of the system back...
  8. J

    How do I delete Access lock files?

    It's actually fairly easy. I've just had to do this after Access stopped working. Create a new folder and transfer every thing to it except the lock file. Delete the original folder with the lock file. Rename the new folder with the same name as the original. Problem solved. Obviously on a...
  9. J

    me.visible = true is false

    I think I might have bigger problems because Access now is refusing to run. It just comes on for a few seconds and then quits. John
  10. J

    me.visible = true is false

    The "closer me" is a sub that closes the current form and clears db and fso objects, if any. The call to "Main_Menu" is an error, corrected, as this procedure should return to the calling routine. I can't see where this is happening. In the case of the supplied code, yes there is the calling...
  11. J

    me.visible = true is false

    Thanks MajP. The code is not actually hanging. In this particular case it is waiting for input but is not visible. In the case of the backup procedure, it performs normally and passes control to the next procedure. I have stepped through the procedure and put msgboxs in here and there. Apart...
  12. J

    me.visible = true is false

    I use .visible=true in most load events to control when the form becomes visible. This works well except for a couple of particular cases. If I run the software in develop mode or click the accde file all is good. If I run it from a shortcut with windows minimized then a couple of the...
  13. J

    Error "Can't set focus"

    If I'm understanding you, I need a call to a sub / function that in turn calls the afterupdate event. If so, should the sub be private in the same procedure or public in a module with reference to the form? I have implemented this, below, and the load event error has gone but the error in...
  14. J

    Error "Can't set focus"

    Calling afterupdate happens if there is only one result from the requery, otherwise the dropdown occurs. Commenting out that call does stop the error but the rest of the program does not run properly. The result of the requery does not appear in the cboGenus combo and the change over from...
  15. J

    Error "Can't set focus"

    Here is a stand alone version of the form. I have added the textbox "txtInput" to simulate the input from a previous form with a spelling mistake. Open the form "getTaxon" and you will see the error.
  16. J

    Error "Can't set focus"

    Hi Docman The hidden controls do not become visible until after the genus has been selected, which is after the error occurs, so there "shouldn't" be any interruption to the flow. I'm working on a stand alone version of the form and will post that asap. There will be a few work arounds...
  17. J

    Error "Can't set focus"

    I provided all the code in my OP and the two queries in a subsequent post. Not sure what else you need. My whole system runs to almost 36000 lines of code but what you have should stand alone .
  18. J

    Error "Can't set focus"

    Yes, I can do that but it's a bit complicated. The cboFamily query is fed by the first 5 characters of a possibly mis-spelt family name from a different form. Hence the loop in cboFamily_gotfocus. This reduces the number of characters in the search until a match is found. Query for cboFamily...
  19. J

    Error "Can't set focus"

    I don't think so because the load event has already passed control to the cboFamily_gotfocus event and on from there, before returning to the load event which, to all intents and purposes, was done and dusted.
  20. J

    Error "Can't set focus"

    In the code below, the sequence of events is as follows; Load event runs through all commands and set's focus to cboFamily. cboFamily gotfocus event does it's stuff. cboFamily_afterupdate runs and set's focus to cboGenus. cboGenus goes through to cboGenus.dropdown. If I'm stepping through, the...
Back
Top Bottom