473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
1 1079
PEB
1,418 Expert 1GB
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

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

Similar topics

7
by: Nathan Bloomfield | last post by:
Hi All, I am hoping someone out there will be kind enough to find out where my code is going wrong. The current code is inefficiant but hopefully it will convey the data I require to be...
1
by: Aravind | last post by:
Hi folks. I am doing a library system, and I have a form that diplays the full history of who has borrowed what book for how long, etc. In that form, there are 2 unbound combo boxes, "Select...
2
by: Colleyville Alan | last post by:
I have a listbox that is populated with info and when the user selects categories of things from the list, it brings up detailed items from which to choose. I want to be able to put a filter on...
1
by: Aravind | last post by:
Hi folks. My database project has the following: -------------------------------------------------------------------------------- tables: Member: MemName, MemNo , MemType, CourseFaculty...
1
by: Aravind | last post by:
Hi folks. My form, frmHistory, has a combo box, cboName, that filters frmHistory by member's name (using a macro). frmHistory also has a few labels that I use for sorting the form (using VBA...
2
by: Gerry Abbott | last post by:
Hi all. Im using a form's recordsource for a report. which works fine Me.RecordSource = Forms("frmdate01").Form.Controls("HoldLog").Form.Controls("frmHoldLog01").Form.RecordSource Ive got a...
8
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the...
3
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
2
by: Dev1 | last post by:
All- I'm new to this forum and i've been working with acces for about 2 days now. I have a form in which I have two combo boxes and depending on what is selected on the first dropdown the second...
2
by: Kevin | last post by:
I want to use a set of check boxes to narrow down entries on a subform. I.e. a check box for black, red & green to describe the colors of a product. So a use clicks Black and only black products...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.