Results 1 to 3 of 3

Thread: Runtime Error

  1. #1
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65

    Unanswered: Runtime Error

    First off thank you everyone for the help that you have provided on this db so far. Hopefully this is the last error for this db. I am getting a run time error when I double click on my calendar. The calendar worked as advertised thanks to cyberlynx, but I had to change/remake a table. The table is exactly the same as before except that the date is formated to date/time instead of text, and the primary key is set to increment instead of random. Now though when I dblclick a date I get a runtime error, evidently I missed something becase the code looks good to me. Any way please open the db and see for yourself. I would appreciate a fix.

    Thanks
    Mike
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    133
    Since the datatype has changed, you'll have to change the single quotes

    Code:
    If DCount("[ID]", "tblcomments", "[Date] = '" & Me.Combo4 & "'") = 0 Then...
    to # signs

    Code:
    If DCount("[ID]", "tblcomments", "[Date] = #" & Me.Combo4 & "#") = 0 Then...
    You will have to do the same with your filter criteria.

  3. #3
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65
    Thanks bmacr,

    Works as advertised, I still had a problem but that was solved with a simple date format.

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •