Real Wally
Registered User.
- Local time
- Today, 06:07
- Joined
- Jan 28, 2003
- Messages
- 107
Hi all,
I've got a form with a subform (table).
Subform has a field ApplicationNum. By clicking on that field a subsequent form opens with application details (frmApplication). The linking field is AppID. Works fine, no problem.
However, a problem occurs when there is no application detail form for an ApplicationNum.
What I'd like to happen in that situation is that a new application detail record opens that automattically copies the AppID number from the subform.
Who's got the golden tip?
What I've got so far in the subform is this:
Private Sub Text14_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmApplication"
If [AppID] = 0 Then
DoCmd.OpenForm stDocName, , acNewRec
Else
stLinkCriteria = "[AppID]=" & Me![AppID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
I realise that at least the 'copy command' is missing but I haven't got a clue.
Thanks for your help,
Wally
I've got a form with a subform (table).
Subform has a field ApplicationNum. By clicking on that field a subsequent form opens with application details (frmApplication). The linking field is AppID. Works fine, no problem.
However, a problem occurs when there is no application detail form for an ApplicationNum.
What I'd like to happen in that situation is that a new application detail record opens that automattically copies the AppID number from the subform.
Who's got the golden tip?
What I've got so far in the subform is this:
Private Sub Text14_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmApplication"
If [AppID] = 0 Then
DoCmd.OpenForm stDocName, , acNewRec
Else
stLinkCriteria = "[AppID]=" & Me![AppID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
I realise that at least the 'copy command' is missing but I haven't got a clue.
Thanks for your help,
Wally