Results 1 to 6 of 6
  1. #1
    Mick99 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    58

    Subform goes blank after deleting the first record

    Hi All, i have a subform with a delete button so items can be removed from the list which works fine until i delete the first record. When i delete the first record all of the records disappear and i'm left with a blank screen. Iv'e tried to refresh and re query but with no luck. Any advise would be greatly appreciated.

    Cheers Mick

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    not enough info.

    How do you delete? i.e. what is the code?
    what is the recordsource to your form?
    is the form a subform?
    what are the form properties for data? (dataentry, allow additions etc)

  3. #3
    Mick99 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    58
    ive tried both standard macro and also some vba code calling the docmd delete record. record source is the table and yes it is a subform, which is where im deleting from which works fine. Main purpose is data entry.Cheers Mick

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    you've only answered one of the four questions. Regret I cannot help without more detail. Now also need to ask, is your delete button on the main form or the subform?

  5. #5
    Mick99 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    58
    Hi sorry, ive added some screen shots of the macro and the screen before and after deletion. This only happens if i delete the first item at the top of the subform. I hope i have provided what you may need to help.

    I have taken a screen shot of the macro
    The record source is "Qry_Main_Data_Set"
    The subform is called "frm_Main_Data_Set_subform"
    The properties are set to dataentry, allow additions

    Click image for larger version. 

Name:	macro.png 
Views:	8 
Size:	34.5 KB 
ID:	30771Click image for larger version. 

Name:	before deletion.png 
Views:	8 
Size:	90.9 KB 
ID:	30772Click image for larger version. 

Name:	after deletion.png 
Views:	8 
Size:	11.1 KB 
ID:	30773

    Cheers Mick

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    Regret I don't use macros (too restrictive) but on the face of it I don't see anything there. It looks like the issue is dataentry setting on your form.

    If it is a subform, it should be linked to a value on your mainform using the linkchild, linkmaster properties so there should be no need for DataEntry (which hides existing records) to be true.

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

Similar Threads

  1. Replies: 18
    Last Post: 07-16-2017, 04:52 AM
  2. Replies: 5
    Last Post: 08-21-2012, 12:30 PM
  3. deleting records off a subform
    By jamin14 in forum Programming
    Replies: 10
    Last Post: 04-22-2010, 08:47 PM
  4. Replies: 0
    Last Post: 09-01-2009, 12:33 PM
  5. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM

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