Search results

  1. G

    Lock all edits whilst query is running ?

    The user that's running the report may not have any idea that someone else is editing or adding records. So they just get a duff result and rely on what's reported. Yes, there's a very short time window to insert/edit a record but wrong is wrong ... On balance I decided that because it sounds...
  2. G

    Lock all edits whilst query is running ?

    Dbuy, The user won't necessarily know that the result is wrong, unless they do add it up. They could run it again, but how do they know that the report is still flawed ? To take the most trivial example (Sorry you may already have got this): A new business is adding invoices continuously...
  3. G

    Lock all edits whilst query is running ?

    Yes I have a union query which unions the 3 select queries which feeds a tree view. I'm not running the select queries separately. Has it ever been an issue ? Well, no, not that I'm aware of. And I agree it's a really tight timescale for something to happen, maybe I shouldn't give it a...
  4. G

    Lock all edits whilst query is running ?

    Sorry, queries. I think of it as 3 passes of SELECT on the same table, one after the other. 3 queries plus a union.
  5. G

    Lock all edits whilst query is running ?

    Well, my records are timestamped for edit time but it won't work. The key thing here, isn't so much that it's a few minutes out of date, but that it's not consistent with itself. If a record has 100 net and 20 VAT, I need to fetch those values on all 3 passes for it to be consistent. If I...
  6. G

    Lock all edits whilst query is running ?

    Hi, Thanks, yes you are right, if we edit after the result is run then it's out of date. But, at the moment of getting the result, I need it to be consistent (if possible, or I would have to have a caveat about possible invalid results. This is an on-the-fly result, if you like). Each...
  7. G

    Lock all edits whilst query is running ?

    I've got a form view which takes a second or two to populate and has to make three passes on the same table to get a result. I need to lock out all users for the period that the union query is running or the result may not be valid. I could read data in Pass 1 and if a user then edits...
  8. G

    Solved Customize Search Box

    Is this what you're after ? .FindFirst " [FieldName] = " & Me.cboStatus & " AND EmployeeID = " & nz(me.txtSearchBox,0) Where FieldName if the table column name in your Employee table.
  9. G

    Solved Customize Search Box

    Of course my bad you need to put the table field name !
  10. G

    Solved Customize Search Box

    I think DBguy mean to replace 'Status' with the name of your control. If you're only ever interested in status 1 or 2 you could try: if EmployeeID is text: .FindFirst "( Me.cboStatus = 1 OR Me.cboStatus = 2 ) AND EmployeeID = '" & me.txtSearchBox & "'" if EmployeeID is numeric: .FindFirst...
  11. G

    get the numeric part of a string

    This is where I would start (this isn't code but gives you an idea) dim varStrArray as variant ' gets you a 1-dimensional array varStrArray = split (string(1),":") ' string(1) = eg "1. open": "125.2500" string part = varStrArray(0) ' eg "1. open" number part =...
  12. G

    Solved Have subforms last record focused

    I do it with a MoveLast command. But, you will get returned to the first record if you call any of the edit commands afterwards, like AllowEdits, more information here: https://www.fmsinc.com/free/NewTips/Access/ResyncSubform.asp
  13. G

    Unbound Multi User DAO Recordset locking

    OK, caveat, I'm not a software or Access professional, in fact I'm not much beyond beginner. I don't think it makes any difference whether my recordset is bound or unbound. I handle the locks and the ability to edit it in code. Here's how I handle record locking. I've tested it by, as you...
  14. G

    Solved Focus on form open via VBA

    Yes, it was that. .SetFocus after hiding. Thank you.
  15. G

    Solved Focus on form open via VBA

    I have a login form which opens to the user name field which is what I want. On login, it opens a menu form and closes itself. When we log out, it opens the login form and the menu form hides. But on subsequent opens the focus goes to the Access object list. I have to click in the user name...
  16. G

    Organisation for Queries

    Thanks all, some good tips there which will enhance my organisation. Always good to hear how others are doing stuff. On the related subject of readable code, I find that if I review my comments some time after I wrote them, I realise I need to make things clearer (including, for myself)
  17. G

    Organisation for Queries

    Just wondering .. how do you organise your queries ? Naming conventions ? Main vs. sub ? After a form ? Now I have more than a handful of saved queries I'm feeling the need for some kind of method of knowing how each one is used. There's nowhere to save a narrative about the query, unless I...
  18. G

    Best way to disallow special characters in a field

    I don't think I ever tested or used this but I remembered bookmarking it just in case https://www.utteraccess.com/forum/index.php?showtopic=779199
  19. G

    Join Table on Expression ?

    Indulge me a bit more as I find this an interesting conundrum. If you feel this discussion is extending a bit please migrate it to Theory and Practice. I still have duplicated data in my table so I'm not committed either way yet. I'm storing my year and period, not as two text pieces but as a...
  20. G

    Join Table on Expression ?

    Oops I said PrdNamesID is AutoNumber, it is long but it's a number from 1 to 53 and as the PK it's indexed of course. I have got it working in the existing query along the lines suggested by pisorisaac and CJ_London like this: (SELECT PrdName FROM tblPrdNames WHERE tblPrdNames.PrdNameID =...
Back
Top Bottom