473,394 Members | 1,694 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,394 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. there is an error in.. .NOMATCH... IT SAYS the data member method not found i already open the dao library.. but why ?? it cant recognize the .nomatch....


Public wsp As Workspace
Public rst As Recordset
Public rst2 As Recordset
Public rstSetup As Recordset
Public dbs2 As Database
Public dbs As Database
Public myeditmode As Boolean
Public myaddmode As Boolean
Public browsing As Boolean
Public mActiveSchoolYear As String

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

Thanks alot guys... if u can help....
Sep 12 '06 #1
5 1292
PEB
1,418 Expert 1GB
Why I have impession that I've posted something about this question? :):):):)
Sep 12 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
At what line is the code stopping?



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. there is an error in.. .NOMATCH... IT SAYS the data member method not found i already open the dao library.. but why ?? it cant recognize the .nomatch....


Public wsp As Workspace
Public rst As Recordset
Public rst2 As Recordset
Public rstSetup As Recordset
Public dbs2 As Database
Public dbs As Database
Public myeditmode As Boolean
Public myaddmode As Boolean
Public browsing As Boolean
Public mActiveSchoolYear As String

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

Thanks alot guys... if u can help....
Sep 12 '06 #3
.Index = "Active"
.Seek "=", True
If .NoMatch Then

it doesnt recognize the nomatch i already open the dao library

tnx
Sep 13 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
I know this sounds silly but go to tools - references and move the DAO library up the list order using the arrows.



.Index = "Active"
.Seek "=", True
If .NoMatch Then

it doesnt recognize the nomatch i already open the dao library

tnx
Sep 13 '06 #5
PEB
1,418 Expert 1GB
Why do not place your filter in:

Set rstSetup = dbs2.OpenRecordset("setup")

this line?

Like:
Set rstSetup = dbs2.OpenRecordset("SELECT * From Setup WHERE (Your filter);")

:)
Sep 13 '06 #6

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: 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...
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.