S
SAL
Hello,
I've tried everything I can think of to open a form from another form and
apply a filter with no luck. I'm using Access XP and have tried the
following from my main form:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPhotos"
stLinkCriteria = "VisitID = " & Form_frmVisit!VisitID
DoCmd.OpenForm stDocName , , , stLinkCriteria
I have also tried the following in this same routine:
Form_frmPhotos.Filter = stLinkCriteria
Form_frmPhotos.FilterOn = True
There are three records in the backend database (sql server 2005) with a
VisitID = 391 and it doesn't show any of them. The DataSource for this form
is dbo.Photo.
What do I have to do to get this form to open up with the correct records
showing?
Thanks for any help on this I've wracked my brain.
S
I've tried everything I can think of to open a form from another form and
apply a filter with no luck. I'm using Access XP and have tried the
following from my main form:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPhotos"
stLinkCriteria = "VisitID = " & Form_frmVisit!VisitID
DoCmd.OpenForm stDocName , , , stLinkCriteria
I have also tried the following in this same routine:
Form_frmPhotos.Filter = stLinkCriteria
Form_frmPhotos.FilterOn = True
There are three records in the backend database (sql server 2005) with a
VisitID = 391 and it doesn't show any of them. The DataSource for this form
is dbo.Photo.
What do I have to do to get this form to open up with the correct records
showing?
Thanks for any help on this I've wracked my brain.
S