Search results

  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:
  16. M

    checkboxes not saving to table

    I added and update per check box as you said, but I'm getting an error: Error 3314: You must enter a value in the tblUserPermissions.FK_UserID field. What about the two combo boxes at the beginning of the code: I amended my code and now it looks like this
  17. M

    checkboxes not saving to table

    I am writing a program in Access 2010. My check boxes are not saving to the table. I have stepped through the code with no errors and it only saves the last check box to the table. Here is my code: I attached the full code.
  18. M

    Problem saving multiple checkboxes to table

    Hi Pat I managed to fix my previous code. I am now trying to run a simple select statement and I get this error: No value given for one or more parameters! The long and short is that the user logs in. When the user selects Manage Employees on the Main Menu, the Employees form must open in...
  19. M

    Problem saving multiple checkboxes to table

    Thanks CJ_London Thanks very much for your time and wisdom, you have been a great help. I deleted the line I added the unique index to the fields you suggested and it seems to be working fine now. I am going to merge the code with the rest of the app and test it to see if everything is...
  20. M

    Problem saving multiple checkboxes to table

    Hi CJ_London Thanks for your input. The data now saves to the table, but now when I click the save button again it saves the record again. I added a line rstPermissions.RecordCount > 0 to prevent duplicate records from being saved, but it doesn't seem to work. Any ideas? If...
Back
Top Bottom