Hello all!
Have researched the issue all day to to avail, therefore turning to your help for the solution.
I have a Form A which is accessed via another Form B only (i.e. not possible for user to go directly to a Form A and add values).
So when the user clicks on a button in the Form B he is taken to the Form A.
In case Form A has a record (CONTAINER) correspondent to key record in Form B, then the correct record is filtered based on the code:
However if there is no correspondent record in Form A there is a code on the Current state to create a new record showing the correspondent record name from Form B:
The first part where there are correspondent records works fine. The trouble starts when no correspondent record is found - Form A shows #Name? instead of a record name from Form B.
I have checked Control Source, Label names - everything is in order. Don't know where else to look.
Your help will be much appreciated.
Have researched the issue all day to to avail, therefore turning to your help for the solution.
I have a Form A which is accessed via another Form B only (i.e. not possible for user to go directly to a Form A and add values).
So when the user clicks on a button in the Form B he is taken to the Form A.
In case Form A has a record (CONTAINER) correspondent to key record in Form B, then the correct record is filtered based on the code:
Code:
Private Sub TTLex_DblClick(Cancel As Integer) Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmExpense" stLinkCriteria = "[CONTAINER]='" & Me![CONTAINER] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog Exit_cmdDetails_Click: Exit Sub Err_cmdDetails_Click: MsgBox Err.Description Resume Exit_cmdDetails_Click End Sub
Code:
Private Sub Form_Current() If Me.NewRecord Then [CONTAINER].DefaultValue = Forms![frmExport]![CONTAINER] End If End Sub
I have checked Control Source, Label names - everything is in order. Don't know where else to look.
Your help will be much appreciated.
Comment