Open form having reference control in subform

mubi_masti

Registered User.
Local time
Today, 09:03
Joined
Oct 2, 2011
Messages
46
hello everybody, can anybody help me in following problem

I have two forms, main & summary

Main forms contains one subform with the name subform_activity having two fields, activity_ID and activity_Date

Main form contains details of all activity while summary contain short version of all activity. In summary i have a button to open the main form for particular record i.e. for particular date.

When i open the summary form and want to see the activity of any date let May 19, 2012, and want to open the main form for this date, the main form load all records instead record of May 19, i am using following code but it is not working and it opens main form with all records.


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Main"
stLinkCriteria = "Forms!main!Subform_activity!activity_date = me!activity_Date"
DoCmd.OpenForm stDocName, , , stLinkCriteria



where I am going wrong, please guide in this regards

Thanks in advance
 
Thanks for your reply

I have followed the same but still form for particular record is not opening. please help
 
Pat you really should try to give internationally compatible advice.
They would need to reformat the date if they are not in the USA.

Code:
stLinkCriteria = "activity_date = " & Format(Me.activity_Date,"\#mm\/dd\/yyyy\#")
 

Users who are viewing this thread

Back
Top Bottom