Search results

  1. D

    Solved Command button on Report to export to excel

    Actually better would be if I could replace the location of desktop to a browse window allowing the user to select the location. Any thought?
  2. D

    Solved Command button on Report to export to excel

    I have been searching for a solution to add a command button to a report that will export the report (or underlying query which ever is better) to an excel file. I have found the following which is supposed to save the file with the date added to the name. I get the message box that the file is...
  3. D

    Format to result in 4 digits

    That was it!!!!! I adapted this code from elsewhere in my database and forgot to change the declaration for this field. The previous field (in the old code) was a number and this is a string. Thank you. You solved my problem (as stupid as it was -which most of mine are!) Again I really...
  4. D

    Format to result in 4 digits

    Understood - and thanks. I am going to stop working on this for a bit because as I said many times the problem comes to me when I come back to it. The comments have been very helpful - formatting is not going to help and the fact the the field is a text field I should be seeing the text as it...
  5. D

    Format to result in 4 digits

    Thanks - that was what i thought.
  6. D

    Format to result in 4 digits

    Yep there is my problem.
  7. D

    Format to result in 4 digits

    Yeah - I get that. but not on purpose.
  8. D

    Format to result in 4 digits

    The table does not have a format for that field
  9. D

    Format to result in 4 digits

    Thank you - if you are suggesting adding that to the code as below - that does not work either. Would there be another place I could add it? strEmpNumber = Format(Me.EmployeeNumber, "0000")
  10. D

    Format to result in 4 digits

    Ok got that - yes it is a text field and because everything else in the database is working correctly (and I use the EmpNumber on almost every form) I do not want to start making changes such as this. I really don't understand why this one form will not see the number as it is in the table (4...
  11. D

    Format to result in 4 digits

    My form displays the Employee Number correctly as 0049, yet when I refer to that field in my code it changes it to 49. I need the code results to show the full number with the proceeding zeros. I tried to format the declared value but this did not work. Any suggestions? strEmpNumber =...
  12. D

    Error Code 3162

    You tried to assign a Null value to a variable that is not a Variant data type.
  13. D

    Error Code 3162

    I think I found the answer it should be set to "" not Null
  14. D

    Error Code 3162

    I need to reset a combo box to display as blank from VBA If I use Me.[EmployeeNumber] = Null I get the error code 3162. What is the correct code to reset a combo box? Thanks
  15. D

    Best way to store info on a form

    Yes I had a mental block about where to put it.
  16. D

    Best way to store info on a form

    I added this to the afterupdate on the form (this is the coding I found that was used previously elsewhere in the datebase and it work! Const cQuote = """" Me.DateCompleted.DefaultValue = cQuote & Me.DateCompleted.Value & cQuote Me.TimeCompleted.DefaultValue = cQuote & Me.TimeCompleted.Value...
  17. D

    Best way to store info on a form

    I want to thank everyone who helped on this problem. It appears that I have the form working exactly as I need it to. You are wonderful - all of you!
  18. D

    Best way to store info on a form

    Sorry - should have tested my theory on this before posting the question. It appears by putting the following before If Me.Dirty Then Me.Undo it does reset the values and clears the fields. Me.DateComplete.DefaultValue = "" Me.TimeCompleted.DefaultValue = ""
  19. D

    Best way to store info on a form

    To clear the form I am currently using If Me.Dirty Then Me.Undo
  20. D

    Best way to store info on a form

    Ok so this is another DUH moment for me - I missed the part of putting it in the afterupdate, I was putting the code in the wrong place. After taking a break from this and looking at it with fresh eyes I realized I had similar code elsewhere in the form and was able to use that and adapt it for...
Back
Top Bottom