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

Filtering forms! records.. please any help...

P: 3
i have trouble in filtering...

im creating a enrollment system. which filtered by school year..

how can i filtered the data. that only the active year will be displayed on the form...

please any idea..

this is my code.. but. their is an error in..


mActiveSchoolYear = "0000-0000"
Set wsp = DBEngine.Workspaces(0)
Set dbs2 = wsp.OpenDatabase("c:\mad\madthesis.mdb")
Set rstSetup = dbs2.OpenRecordset("setup")
With rstSetup
.Index = "Active"
.Seek "=", True
If .NoMatch Then
MsgBox "You must Activate the Current School Year to Continue!!!", vbExclamation + vbOKOnly, "Setup Warning"
' DoCmd.Close
Set wsp = Nothing
Set dbs2 = Nothing
Set rstSetup = Nothing
Else
mActiveSchoolYear = .Fields("[School/Year]")
Set wsp = Nothing
Set dbs2 = Nothing
Set rstSetup = Nothing
End If
End With
Me.AllowEdits = True
Set dbs = CurrentDb
Set mycform = Me
Me.Schoolyear = mActiveSchoolYear
Sep 12 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
hi,

this is a code in Vb or in Access basic?

If in Access why do you use those methods to filter a form? There is a specialized form property to filter on!

Have a nice day!
:)
Sep 12 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.