Consulting

Results 1 to 10 of 10

Thread: error 3464 data type mismatch in criteria expression

  1. #1
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location

    error 3464 data type mismatch in criteria expression

    Hello,

    really need help to solved error 3464 in vba

    the code :
    Private Sub Ambil_Click()
    DoCmd.OpenForm "FrmOrder", , , "[Nota]=" & "'" & _
    [TblOrder_subform3]![Nota] & "'", acFormEdit

    DoCmd.Close acForm, Me.Name, acSaveYes
    End Sub

    it shows run time error '3464'
    data type mismatch in criteria expression

    i want to open and edit form (FrmOrder) that shows in subform and i really don't know whats wrong with the code and how to solve it.

    really need help

  2. #2
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    If I understand correctly, you have a form, FrmOrder, with a subform. Is that correct? If so, it appears that the FrmOrder control "Nota" is the criteria for linking the subform. Is that correct?
    What's the name of your subform?
    Can include either screenshots, or a copy of the database?

  3. #3
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    Quote Originally Posted by mrojas View Post
    If I understand correctly, you have a form, FrmOrder, with a subform. Is that correct? If so, it appears that the FrmOrder control "Nota" is the criteria for linking the subform. Is that correct?
    What's the name of your subform?
    Can include either screenshots, or a copy of the database?
    Hi Mrojas,

    here is the answer of your questions :
    Form order not include with subform, form order is used to input order. and form CariNota is the form that include subform to find the order base on Nota (number) so when click "ambil" access with show the form with the same Nota number, the screenshot below (i don't know how to add more image per post coz it said only 1 image per post, so please check few post below)
    TblOrder.jpg this is the TblOrder

  4. #4
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    FormOrder.jpg this is FrmOrder (to input order)

  5. #5
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    Error.jpg Error

  6. #6
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    Debug.jpg Debug

  7. #7
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    Quote Originally Posted by mrojas View Post
    If I understand correctly, you have a form, FrmOrder, with a subform. Is that correct? If so, it appears that the FrmOrder control "Nota" is the criteria for linking the subform. Is that correct?
    What's the name of your subform?
    Can include either screenshots, or a copy of the database?
    thank you very much for helping me

  8. #8
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    Your problem is the DoCmd statement; it should read:
    DoCmd.OpenForm "FrmOrder",,,"[Nota]=" & TblOrder_subform3![Nota],acFormEdit

  9. #9
    VBAX Regular
    Joined
    Nov 2013
    Posts
    7
    Location
    Quote Originally Posted by mrojas View Post
    Your problem is the DoCmd statement; it should read:
    DoCmd.OpenForm "FrmOrder",,,"[Nota]=" & TblOrder_subform3![Nota],acFormEdit
    it's work.... thank you.. thank you... thank you... thank you so much...

  10. #10
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    If solved, please mark it as such.

Posting Permissions

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