Recent content by marvil

  1. M

    Question DoCmd.DoMenuItem

    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 if the commands constants are zero based then I assume 8 refers to acDelete
  2. M

    Question DoCmd.DoMenuItem

    In the code below it seems that the 3 refers to the menuname acRecordsMenu and if the commands constants are zero based then I assume 0 refers to acNew. Does that make sense to you? Docmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70 Take a look at...
  3. M

    Question DoCmd.DoMenuItem

    I was asked to complete the VBA code in an incomplete Access database. I found the following line of code which means to save the current record: DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 I am using Access 2010. Would it not be better to write it this way...
  4. M

    Problem saving multiple checkboxes to table

    CJ_London Answering your statement: I'm now lost was to what you are trying to achieve I haven't coded in Access VBA for over 7 years, so I am trying to familiarise myself with the VBA syntax, while trying to write the program. My client presented me with an incomplete Access database...
  5. M

    datatype mismatch error in criteria expression

    I have to say that you and some of the other guys here have given me some very good coding advice over the past two days. Thanks very much for your help. Keep up the good work because people like me really appreciate it.
  6. M

    datatype mismatch error in criteria expression

    Thanks pbaldy I am a bit frustrated because when I fix one error, up pops the next one. I am a C# coder and struggling to get used to the VBA syntax. I incorporated your suggestion and it seems to work fine now.
  7. M

    datatype mismatch error in criteria expression

    I am getting a datatype mismatch error in criteria expression
  8. M

    checkboxes not saving to table

    It was a typo I made in my If statement, I corrected it and thank you very much I clearly missed it. you have for records 1358 and 1359 which Is it possible to leave out the else statements? I only want to write Add, Edit or View in the Allowed field and exclude the "None". I removed...
  9. M

    checkboxes not saving to table

    Ok I have managed to attach the text files - see attachment
  10. M

    checkboxes not saving to table

    Sorry struggling a bit to find the correct format. I exported the query to Word, Excel but the uploader is complaining about the file extension
  11. M

    checkboxes not saving to table

    Is this what you mean by "list all possible cases" - See attachments
  12. M

    checkboxes not saving to table

    The indexes actually caused more problems. The only reason I added them was to prevent a user from adding the same record twice. Sometimes a user's mind wonders a bit and then he/she cannot remember whether they have already saved the record - See the attachment "ResultNow". The result I...
  13. M

    checkboxes not saving to table

    I removed the index from the three fields and it now saves to the table - See the attachment "ResultNow". Can I leave out the 'else-statements'? Because the result I actually want is in the attachment: "Result I want"?
  14. M

    checkboxes not saving to table

    Please see the table structure and indexes in the attachment. I don't want users to save duplicate records that's why I added the indexes. Should "Ignore Nulls" be Yes or No?
  15. M

    checkboxes not saving to table

    I added the code as you suggested but I am getting an new error: Error 3022 complaining about duplicate records, because I added a unique index on FK_UserID, FK_UserRoleID and FormName. It only saved the two lines in the first else-statement:
Back
Top Bottom