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 mActiveSchoolYe ar As String
mActiveSchoolYe ar = "0000-0000"
Set wsp = DBEngine.Worksp aces(0)
Set dbs2 = wsp.OpenDatabas e("c:\mad\madth esis.mdb")
Set rstSetup = dbs2.OpenRecord set("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
mActiveSchoolYe ar = .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 = mActiveSchoolYe ar
Thanks alot guys... if u can help....
5 1301 PEB 1,418
Recognized Expert Top Contributor
Why I have impession that I've posted something about this question? :):):):)
MMcCarthy 14,534
Recognized Expert Moderator MVP
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 mActiveSchoolYe ar As String
mActiveSchoolYe ar = "0000-0000"
Set wsp = DBEngine.Worksp aces(0)
Set dbs2 = wsp.OpenDatabas e("c:\mad\madth esis.mdb")
Set rstSetup = dbs2.OpenRecord set("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
mActiveSchoolYe ar = .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 = mActiveSchoolYe ar
Thanks alot guys... if u can help....
.Index = "Active"
.Seek "=", True
If .NoMatch Then
it doesnt recognize the nomatch i already open the dao library
tnx
MMcCarthy 14,534
Recognized Expert Moderator MVP
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
PEB 1,418
Recognized Expert Top Contributor
Why do not place your filter in:
Set rstSetup = dbs2.OpenRecord set("setup")
this line?
Like:
Set rstSetup = dbs2.OpenRecord set("SELECT * From Setup WHERE (Your filter);")
:)
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 filtered.
Basically I have a popup form which has 6 optional controls to filter
records in another form. The code below does not work. Can anyone
suggest some correctons or alternatives.
|
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 Member" and "Select Book". If
I select a name from "Select Member", the history is filtered to show
the borrowing history of that particular member, and the same applies
to choosing a book from "Select Book". I cannot, however, do both at
the same...
|
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 that list that can be
driven by a radio button. The question is, how do I go about this?
I can get a radio button to execute code and the screen to refresh, but I am
not certain about how to build the filter for the list. I populate the
listbox...
|
by: Aravind |
last post by:
Hi folks.
My database project has the following:
--------------------------------------------------------------------------------
tables:
Member: MemName, MemNo , MemType, CourseFaculty
History: contains all of the above
queries:
|
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 code). The problem is that,
when I filter the form using cboName, I can't sort the filtered form
(the form becomes empty if I try to sort). Here are the coding (I'm
using the sorting code for 1 of the labels). Does anyone know what
went wrong? I'm...
| |
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 couple of buttons on the form which allows the user to filter from
a full recordset, on the form. I now wish to use a date filter when running
the report, so that the report takes the filtered recordset (me.recordset)
|
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 docmd.openreport as follows
DoCmd.OpenReport stDocName, acPreview, , strWhere
where strWhere is a string dependant on the choices the user makes in the
|
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
implemented simultaneously for multiple columns - but the data need
only be sorted by a single column at a time. Sorting should be both
ascending and descending.
I'm currently using a DataView but it's far too slow, because there
are a large...
|
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 one gets populated accordingly, which is great! There are two problems;
First the when I select the value from the second drop down the value in the first and second combo box go away!!
Second when I remove the filter the values for all the...
|
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 are shown, the click green and only
black and green products are shown. There will be a large number of choices
that a user can make so I'm wondering...
can I right a bit of code or function and put in a seperate module to call
from an after...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |