Results 1 to 2 of 2

Thread: type mismatch

  1. #1
    Join Date
    Apr 2004
    ny, ny

    Unanswered: type mismatch

    DoCmd.openform "CurrWorkOrder", , , "[WorkOrderID]=" & "'" & Me.List.Column(2) & "'"
    Apparently WorkOrderID has to be in text format for the openform command to work. If I change it to autonumber which is what I want, it gives me runtime error 2501.

    My first question is does it really have to be in text format
    If it does how do i auto generate WorkOrderID like an autonumber
    I have been struggling with this for quite some time so any help will be greatly appreciated

    thank you

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    yeah... you have the filter specified as text.

    When you enclose a number in single quotes, it becomes text.

    Try this:
    DoCmd.openform "CurrWorkOrder", , , "[WorkOrderID]=" & Me.List.Column(2)
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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