Results 1 to 9 of 9
  1. #1
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8

    Delete record


    Hello

    I tried to delete record from ms access I get error see in photo please help me how to solve this problem
    Attached Thumbnails Attached Thumbnails Prinschr2.jpg   Prinschr1.jpg  

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    You need a .form after your subform name and before the name of the control

  3. #3
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    Dear CJ,

    I just change from Forms!frmNav.NavigationSubform!frmStdList.Requery in to Forms!frmNav.NavigationSubform.Form.frmStdList.For m.Requery

    Still not get error !

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Try
    Forms!frmNav.NavigationSubform.Form.frmStdList.Req uery

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Please do not post pics of code but copy/paste within code tags.
    The form you want to requery is not on your nav form? I would suggest that you try forms!frmStdListmain.requery but for some reason that doesn't seem to refresh the records. Will have to look and see why.

    EDIT - don't see why you're using a nav form at all. Simpler to make your own form and use it as a switchboard.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Yikes. The form you want to requery is a subform on a form that you're basically using as a container and nothing else. So
    forms!frmStdListmain.frmStdList.form.requery

    You're making things more complicated than necessary with that design.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    Dear Micron

    I Try is working i don't have error anymore

    Code:
    forms!frmStdListmain.requery
    
    DoCmd.Close acForm, "frmStdListmain"
    DoCmd.OpenForm "frmStdListmain"

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Yikes. The form you want to requery is a subform on a form that you're basically using as a container and nothing else. So
    forms!frmStdListmain.frmStdList.form.requery

    No need to close the "main" form - just change the code to refer to the correct form.
    You're making things more complicated than necessary with that design.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    Quote Originally Posted by Micron View Post
    Yikes. The form you want to requery is a subform on a form that you're basically using as a container and nothing else. So
    forms!frmStdListmain.frmStdList.form.requery

    No need to close the "main" form - just change the code to refer to the correct form.
    You're making things more complicated than necessary with that design.
    Dear Micron,

    Thank you for your help

    Is working goed

    Well Done !

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-03-2019, 09:09 AM
  2. Replies: 7
    Last Post: 10-08-2015, 09:14 AM
  3. Replies: 4
    Last Post: 07-03-2013, 10:02 AM
  4. Replies: 3
    Last Post: 10-19-2012, 04:30 PM
  5. Trying to Delete record using delete query
    By MooseOTL in forum Access
    Replies: 13
    Last Post: 10-04-2011, 02:30 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
  •  
Other Forums: Microsoft Office Forums