pbuethe
Returning User
- Local time
- Today, 18:39
- Joined
- Apr 9, 2002
- Messages
- 210
I have a continuous subform with a button that is supposed to open another continuous form of related records. I have done this in the past with help from the forum and tried to follow the same method. However this time, it does not work. I have the following:
The record source of both forms includes: CaseID, PageSeq, ColumnNo, and arvEvent which are all needed to identify each record. Each case can have multiple pages, each page has four columns (not all of which may have data), each column can have multiple events. Some of the events have one or more modifiers which should be displayed by the second form. I have the following code to open the second form:
Also, on the BeforeInsert of frmARVModifiers, I have:
When I click the button, I get a dialog box saying "Enter Parameter Value" but instead of a variable name it shows the value of the current Event.
I appreciate your help.
The record source of both forms includes: CaseID, PageSeq, ColumnNo, and arvEvent which are all needed to identify each record. Each case can have multiple pages, each page has four columns (not all of which may have data), each column can have multiple events. Some of the events have one or more modifiers which should be displayed by the second form. I have the following code to open the second form:
Code:
Private Sub cmdModifiers_Click()
On Error GoTo Err_cmdModifiers_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmARVModifiers"
stLinkCriteria = "[CaseID] = '" & Me.[CaseID] & "' AND [PageSeq] = '" & Me.[PageSeq] & "' AND [ColumnNo] = '" & Me.[ColumnNo] & "' AND [arvEvent] = " & Me.[arvEvent]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdModifiers_Click:
Exit Sub
Err_cmdModifiers_Click:
MsgBox Err.Description
Resume Exit_cmdModifiers_Click
End Sub
Also, on the BeforeInsert of frmARVModifiers, I have:
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.CaseID = Forms!frm50973!frmARVModifiers.Form!CaseID
Me.PageSeq = Forms!frm50973!frmARVModifiers.Form!PageSeq
Me.ColumnNo = Forms!frm50973!frmARVModifiers.Form!ColumnNo
Me.arvEvent = Forms!frm50973!frmARVModifiers.Form!arvEvent
End Sub
When I click the button, I get a dialog box saying "Enter Parameter Value" but instead of a variable name it shows the value of the current Event.
I appreciate your help.
Last edited: