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