Pedro Janssen
pedro at plex.nl
Tue Dec 9 17:05:35 CST 2003
Hello Group, I use the code below to open a (sub)form so that the data of PrProduktgegevens1ID is also present on this (sub)form. I have 10 PrProduktgegevensID fields on the head form. Each PrProduktgegevenID has its on new (sub)form. The headform and all the 10 (sub)forms have the same query as Record Source. But many times when i open the (sub)form, the data of the PrProduktgegevensID isn't placed. Its fields are empty. How is this possible? Can i better also place the recordID of the headform in the stLinkCriteria? (sorry for the bad explanation of this problem. But i find it difficult to explain the problem in English) TIA Pedro Janssen Private Sub cmdPrGegSub1_Click() On Error GoTo Err_cmdPrGegSub1_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmPrGegSub1" stLinkCriteria = "[PrProduktgegevens1ID]=" & Me![PrProduktgegevens1ID] DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdPrGegSub1_Click: Exit Sub Err_cmdPrGegSub1_Click: MsgBox Err.Description Resume Exit_cmdPrGegSub1_Click End Sub