By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,348 Members | 1,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,348 IT Pros & Developers. It's quick & easy.

linked form instead of subform - 1 to many relationship

P: n/a

I'm having trouble with using a linked form instead of a sub form on a
1 to many relationship. Then linked form can be accessed from various
other forms. When it opens the linked form, if there are no records
the clientID is 0.
I tried the following code behind the button to open the linked form:
stLinkCriteria = "[ClientID]=" & Me![ClientID]
DoCmd.OpenForm "frmLinked", , , stLinkCriteria

If Forms!frmLinked!ClientID = 0 Then
Forms!frmLinked!ClientID = Forms!frmMain!ClientID
End If
I would set the default value of ClientID to:
but as the parent form could be any of many I need to find another way.


Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.