Results 1 to 2 of 2
  1. #1
    MarcusM is offline Novice
    Windows 8 Access 2007
    Join Date
    Jul 2017
    Posts
    2

    MS Access subform not displaying records when navigating backwards

    I have a one-to-one relationship. The main form's table has more records than the subform table. Master and child links are set. I have decompiled and have done compact and repair. I suspect my application is malfunctioning. In that case it is not the first time (I fixed it). Nothing seems to be working this time. I have also imported into a new database.
    On form-load both forms and fields are well. I continue to the next records using a ['NEXT'] button and reach the end of the sub-forms records therefore having blanks fields. I try to navigate to the previous records (also using a button) but the subform does not move/navigate. Nothing happens to the subform.
    It seems like it has gotten worse because first it was navigating but was not obeying code saying when text box is filled disable checkbox and vise versa.


    I am not able to share a screenshot if it is required. I have done compact and repair and decompile.
    Here is the Current event code:
    Private Sub Form_Current()

    btnPreviousRecord.Enabled = Not (CurrentRecord = 1 Or NewRecord)
    btnNextRecord.Enabled = Not (CurrentRecord = DCount("*", RecordSource) Or NewRecord)

    'For a new Order table record
    If (IsNull(Forms!Order!OrderSubform.Form!txtDate_Of_O rder_Cancel.Value) Or _
    Forms!Order!OrderSubform.Form!txtDate_Of_Order_Can cel.Value = "") Then
    Forms!Order!OrderSubform.Form!chckbxOrder_Cancelle d.Value = False
    Else
    Forms!Order!OrderSubform.Form!chckbxOrder_Cancelle d.Value = True
    '' ElseIf (IsNull(Forms!Order!OrderSubform.Form!txtDate_Of_O rder_Cancel.Value) Or _
    '' Forms!Order!OrderSubform.Form!txtDate_Of_Order_Can cel.Value = "") Then
    ' 'Forms!Order!OrderSubform.Form!txtDate_Of_Order_Ca ncel.Enabled = False
    ' 'Forms!Order!OrderSubform.Form!chckbxOrder_Cancell ed.Enabled = True
    ' Forms!Order!OrderSubform.Form!chckbxOrder_Cancelle d.Value = False
    ' ElseIf (Forms!Order!OrderSubform.Form!chckbxOrder_Cancell ed.Value = False) Then
    ' Forms!Order!OrderSubform.Form!txtDate_Of_Order_Can cel.Enabled = True


    ' ElseIf (Forms!Order!OrderSubform.Form!chckbxOrder_Cancell ed.Value = True) Then
    ' Forms!Order!OrderSubform.Form!txtDate_Of_Order_Can cel.Enabled = False
    '' Else
    '' Forms!Order!OrderSubform.Form!txtDate_Of_Order_Can cel.Enabled = True
    '' Forms!Order!OrderSubform.Form!chckbxOrder_Cancelle d.Enabled = False
    '' Forms!Order!OrderSubform.Form!chckbxOrder_Cancelle d.Value = False
    End If

    End Sub

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What is the "subject/business" of this database?
    You mention 1 to 1 relationship, but also talk of master and child???
    Please tell us about the "business" you are trying to support with this database in simple, plain English.
    Good luck.

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

Similar Threads

  1. Added records not displaying in subform
    By klnlsu in forum Forms
    Replies: 5
    Last Post: 02-15-2016, 09:01 AM
  2. Problems with Subform displaying records
    By Astron2012 in forum Forms
    Replies: 2
    Last Post: 09-07-2012, 05:56 AM
  3. Replies: 12
    Last Post: 04-25-2012, 08:06 AM
  4. Navigating from Form to SubForm
    By Gryphen957 in forum Forms
    Replies: 1
    Last Post: 11-19-2010, 10:08 AM
  5. No navigating through records??
    By cvansickle in forum Forms
    Replies: 2
    Last Post: 10-27-2010, 04:05 PM

Tags for this Thread

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