Form1
Programmer
- Apr 27, 2005
- 12
I'm using OpenForms function to open form B with specific record from form A.
If the record is present in Form B then
it should show the record and allow user to update
else if not present
then user should be allowed to enter new record in Form B
Function OpenForms(strFormName As String) As Integer
dim stLinkCriteria as String
stLinkCriteria = "[Id]" = & Me!Id
DoCmd.OpenForms strFormName,,,stLinkCriteria,,,Me!Id
With Forms.item(strFormName)
.AllowAdditions = true
.AllowDeletions = True
.AllowEdits = True
End With
End Function
The above solution does not work. Is there any other way to do it.
I can not use acAdd it add new record every time.
Thanks
If the record is present in Form B then
it should show the record and allow user to update
else if not present
then user should be allowed to enter new record in Form B
Function OpenForms(strFormName As String) As Integer
dim stLinkCriteria as String
stLinkCriteria = "[Id]" = & Me!Id
DoCmd.OpenForms strFormName,,,stLinkCriteria,,,Me!Id
With Forms.item(strFormName)
.AllowAdditions = true
.AllowDeletions = True
.AllowEdits = True
End With
End Function
The above solution does not work. Is there any other way to do it.
I can not use acAdd it add new record every time.
Thanks