Hi,
Hope you can help me on this...
I got 1 form with a sub form. On this subform there are only parts of
records, so you can select the one you want to edit.
When you dubbel click that record a second form will open and you see all
info of that record(also the info that was already shown on form 1)
Now is it posible to edit the record.
So far no problem, but
On the sub form on form1 you can also dubbel click the *(add new) record.
Form 2 will open with all blank fields.
After adding the new info, form2 dont want to close, becausse its missing a
linked ID to the main form1
The way I open form 2 is:
Private Sub Form_DblClick(Cancel As Integer)
On Error GoTo Err_Form__DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Repair Query"
stLinkCriteria = "[RMA nr]=" & "'" & Me![RMA nr] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Form__DblClick:
Exit Sub
Err_Form__DblClick:
MsgBox Err.Description
Resume Exit_Form__DblClick
end sub
The main form1 is called [Monitor] with a auto ID called [Monitor ID]
The sub form is called [Repair Query Sub Form] with a linked [Rev Monitor
ID] to the main form [Monitor]
And the second form [Repair Query] " "
" " "
I also made a simple example database to show the problem:
http://groups.msn.com/MSAccessforum/...ssage&mview=1&
ID_Message=1362
Thanx
Xiphias