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

linked form instead of subform - 1 to many relationship

P: n/a
hi

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:
Forms!frmMain!ClientID
but as the parent form could be any of many I need to find another way.
Help

Lou

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.