Page 3 of 3 FirstFirst 123
Results 31 to 33 of 33

Runtime error 13 type mismatch

  1. #31
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    224
    Quote Originally Posted by ssanfu View Post
    There is no "Trial 2" dB, only "Trial 1" (in both zip files).

    I think this done the trick, lets hope lol
    Attached Files Attached Files

  2. #32
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    7,695
    The first thing I would suggest is in "tblJobDetails",
    1) delete the field "JobNumber",
    2) then change "JobNextNumber" from Text to a number (Integer) type field.

    You are using the name "JobNumber"in a query, but it is not the field in the table. It is a calculation in a query.
    In the query "qryJobDetails", you have a column "JobNumber: [tblJobDetails.JobPrefix] & "" & [tblJobDetails.JobNextNumber]".

    BTW, in the form "EditJobDetails", the control that is supposed to display the job number is actually showing "JobNoID_PK"! This should be changed to "JobNumber" to show the job prefix ("J") concatenated to the "JobNextNumber" field..


    Same thing for "tblOrderNumbers". Delete the field "OrderNumber" and change the field type for "OrderNextNumber" from Text to Number - Integer.


    ---------------------------------------------------------
    Another thing to be aware of...
    In form "CabinetTech", you have a button "cmdCloseCabtech", with code
    Code:
    Private Sub cmdCloseCabtech_Click()
        DoCmd.Close acForm, "CabinetTech", acSaveYes
        DoCmd.Close acForm, "LoginForm", acSaveYes
        DoCmd.OpenForm "LoginForm"
    End Sub
    The "acSaveYes" does not do what you think it does. "acSaveYes" is for saving changes to the DESIGN of the form, NOT the form data.
    The form data is automatically saved when the form closes or you move to another record.
    So the "acSaveYes" can and should be deleted from the DoCmd statement.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  3. #33
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    224
    Quote Originally Posted by ssanfu View Post
    The first thing I would suggest is in "tblJobDetails",
    1) delete the field "JobNumber",
    2) then change "JobNextNumber" from Text to a number (Integer) type field.

    You are using the name "JobNumber"in a query, but it is not the field in the table. It is a calculation in a query.
    In the query "qryJobDetails", you have a column "JobNumber: [tblJobDetails.JobPrefix] & "" & [tblJobDetails.JobNextNumber]".
    I actually was under the impression that I could only use a column in a query if was in a tbl.... so i should use an unbound field to get my Number J2365?

    Quote Originally Posted by ssanfu View Post
    BTW, in the form "EditJobDetails", the control that is supposed to display the job number is actually showing "JobNoID_PK"! This should be changed to "JobNumber" to show the job prefix ("J") concatenated to the "JobNextNumber" field..
    Yes there might be a few like that, this is some house cleaning i still need to do... i changed things around with everyones advice going to Auto generated next numbers in lieu of using the Primary Key Numbers

    Quote Originally Posted by ssanfu View Post
    Same thing for "tblOrderNumbers". Delete the field "OrderNumber" and change the field type for "OrderNextNumber" from Text to Number - Integer.


    ---------------------------------------------------------
    Another thing to be aware of...
    In form "CabinetTech", you have a button "cmdCloseCabtech", with code
    Code:
    Private Sub cmdCloseCabtech_Click()
        DoCmd.Close acForm, "CabinetTech", acSaveYes
        DoCmd.Close acForm, "LoginForm", acSaveYes
        DoCmd.OpenForm "LoginForm"
    End Sub
    The "acSaveYes" does not do what you think it does. "acSaveYes" is for saving changes to the DESIGN of the form, NOT the form data.
    The form data is automatically saved when the form closes or you move to another record.
    So the "acSaveYes" can and should be deleted from the DoCmd statement.
    I will get rid of them all.

    what did you think of the way orders are produced.. have i made it complicated?

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. ADO Parameter Runtime 13: Type Mismatch
    By ASWilliams in forum Programming
    Replies: 3
    Last Post: 06-02-2016, 09:02 AM
  2. Type 13 (Type Mismatch) error
    By sdel_nevo in forum Programming
    Replies: 5
    Last Post: 01-22-2016, 09:01 AM
  3. Replies: 2
    Last Post: 08-24-2015, 08:14 PM
  4. Replies: 7
    Last Post: 07-24-2013, 01:01 PM
  5. Replies: 1
    Last Post: 05-11-2012, 09:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums