Search results

  1. B

    Solved DMAX with miltiple criteria

    Does explain a few problems I have had in the past. Frustrating having to go through the refresh cycles every time a change is made.
  2. B

    Solved DMAX with miltiple criteria

    I was getting to desperation stakes with it as, like you, I cannot see why me.fieldname would not have worked. It worked in other parts of the function so... Anyway, all is good in the world again - until the next time 8-) The application has been running for over ten years without this hickup...
  3. B

    Solved DMAX with miltiple criteria

    I changed the me.fieldname to forms!formname!fieldname and everything works! No idea why as all names matched. Some days, you waste more time using shortcuts rather than a few more keystrokes. Thanks everybody for their help.
  4. B

    Solved DMAX with miltiple criteria

    Well spotted about the variables. I will fix that. The setting of the field NextReq to 0 prevents problems adding 1 to the field. The data is actually written to the table but the Req_No is always set to one. This must be numerically higher than the previous record matching the three other...
  5. B

    Solved DMAX with miltiple criteria

    Thanks for your input. All the fields are numeric.
  6. B

    Solved DMAX with miltiple criteria

    The rejected field was Req_Dept and it was rejected wherever I put it in the command - I tried this in case the error was in another field but was hidden. The table included that field, the form used that field name and it is used in many places throughout the application. It is only in the...
  7. B

    Solved DMAX with miltiple criteria

    All the variables are numeric. Thanks for your help
  8. B

    Solved DMAX with miltiple criteria

    Hi again, I must be missing something stupid as this command appeared to work before. I am trying to find the next number in sequence based upon three variables but it fails to compile with a compile error of "Method or data member not found". I have checked the exact names / spelling of all...
  9. B

    Question Audit trail question

    Hi - I have some VBA code I downloaded some time ago and use in one of my applications. I need to change the coding so that ALL data fields are saved and not just the record ID. The module fires as soon as a new record ID is created and records that value only, rather than all of the data in...
  10. B

    How to update fields on a form using previous inputs

    Just tried it again and it returns a zero for new records instead of it being set to 1. Not sure why but at least I have a resolution thanks to your guidance. Cheers
  11. B

    How to update fields on a form using previous inputs

    I have managed to do it using the nz option after the fields were populated. If the rec_id is null it sets it to one but doesn't change it if it isn't null. Forms!frm_requirements_create!Req_No = DLookup("nextone", "tbl_requirement_testings_Query") + 1...
  12. B

    How to update fields on a form using previous inputs

    Sorry but I cannot get it to work. I have tried lots of different ways but it doesn't work for me. I have put it as two steps in my proc but it simply seems to ignore the nz command and returns a null value anyway. Forms!frm_requirements_create!Req_No = DLookup("nextone"...
  13. B

    How to update fields on a form using previous inputs

    Thanks - how could I do that? I did try if isnull but that doesn't work. Sorry to be a pain.
  14. B

    How to update fields on a form using previous inputs

    You are a genius! Worked like a charm. Many thanks. Something else I have learned today
  15. B

    How to update fields on a form using previous inputs

    The previous three fields display ascii values but the key to the are numeric. I use the combination of the three values to identify the current highest value plus 1 for the fourth key. I am using DoCmd.OpenQuery "tbl_requirement_testings_Query" Forms!frm_Requirements_Create!Req_No = nextone...
  16. B

    How to update fields on a form using previous inputs

    Hi All - can you help me or point me in the right direction please? I have written a form that uses three drop-down boxes to enable a user to select three different areas and then generate a new number value in the fourth field. The dropdown boxes work fine and the system does fine the next...
  17. B

    Hope this is the right place!

    Hi All - I have just joined the site and I understand that I must introduce myself. I am a part-time developer in Access, starting with the original Access 97 - or was that 98? - moving through most versions in between up to 2016. I normally only use the code generated by Access but have...
Top Bottom