Hi,
I'm trying to create a report that will produce automated sets of Committee Minutes for School Appeals, where there are a set range of different outcomes.
The field involved are all from the same table, and called:
[OUTCOME], [SCHOOL TYPE], [SCHOOL], [PRIMARY/SECONDARY] and [YEAR APPLIED FOR]
In the query where the result of the outcome in needed, it has the following in a field: - Minute: MINUTEOUTCOME([OUTCOME],[SCHOOL TYPE],[SCHOOL],[PRIMARY/SECONDARY],[YEAR APPLIED FOR])
And in a module, I have the following: - Option Compare Database
-
-
Public Function MINUTEOUTCOME(OUTCOME, SchoolType, School, PrimarySecondary, YearAppliedFor) As String
-
-
Dim strMINUTEOUTCOME As String
-
-
'Evaluate the outcome type
-
-
Select Case OUTCOME
-
-
Case "Grant - Stage 1"
-
strMINUTEOUTCOME = "RESOLVED – That the " & SchoolType & " has failed to demonstrate that the admission of an additional pupil to " & School & " " & PrimarySecondary & " School in " & YearAppliedFor & " would prejudice the provision of efficient education and the efficient use of resources and that accordingly the " & SchoolType & " be requested to make a place available."
-
-
-
-
Case "Grant - Stage 2"
-
strMINUTEOUTCOME = "RESOLVED – (1) That Panel were satisfied that the admissions procedure had been applied correctly in the circumstances of the case." _
-
& " " _
-
& "(2) That the appeal against the decision of the " & SchoolType & " to refuse a place at " & School & " " & PrimarySecondary & " School in " & YearAppliedFor & " be upheld on the grounds that the case put forward by the parents outweighed the prejudice established by the " & SchoolType & ", and that a place be made available at " & School & " " & PrimarySecondary & " School."
-
-
-
Case "Refused"
-
strMINUTEOUTCOME = "RESOLVED – (1) That Panel were satisfied that the admissions procedure had been applied correctly in the circumstances of the case. " _
-
& " " _
-
& "(2) That the appeal against the decision of the " & SchoolType & " to refuse a place at " & School & " " & PrimarySecondary & " School in " & YearAppliedFor & " be dismissed on the grounds that the Panel was satisfied that to allow the appeal and to allocate a place at " & School & " " & PrimarySecondary & " School would be prejudicial to the provision of efficient education and the efficient use of resources to such an extent as to override the reasons put forward by the parent in preferring " & School & " " & PrimarySecondary & " School."
-
-
-
Case "Deferred"
-
strMINUTEOUTCOME = "RESOLVED – That consideration of the appeal be deferred."
-
-
Case "Withdrawn"
-
strMINUTEOUTCOME = "The Clerk informed the Panel that the appeal had been withdrawn."
-
-
-
Case "Maladministration (Inf. Class Size Appeal)"
-
strMINUTEOUTCOME = "RESOLVED – That the appeal be granted on the basis that the child would have been offered a place if the admission arrangements had been properly implemented."
-
-
-
Case "Grant - Unreasonable (Inf. Class Size Appeal)"
-
strMINUTEOUTCOME = "RESOLVED – That the appeal be granted on the basis that the decision to refuse a place was not one a reasonable authority would have made in the circumstances of the case."
-
-
-
Case "Refused (Inf. Class Size Appeal)"
-
strMINUTEOUTCOME = "RESOLVED – That the appeal be refused on the grounds of class size prejudice."
-
-
-
-
End Select
-
-
MINUTEOUTCOME = strOutcome
-
-
End Function
Although I've eradicated a number of error messages from my original attempts, when the query runs, it bring up no data.
Can anyone spot where I may have done wrong?
7 1717 Megalog 378
Recognized Expert Contributor
This line: - MINUTEOUTCOME = strOutcome
Should be: - MINUTEOUTCOME = strMINUTEOUTCOME
Since "strOutcome " isnt defined in your procedure, I'm not sure why it hasnt errored out at this point.
ChipR 1,287
Recognized Expert Top Contributor
That happens when you don't use
Megalog: Many thanks! I've made that change, but still no luck.
ChipR: Do I just need to insert 'Option Explicit' within the Public Function?
Assuming the answer to that is yes... I'm now getting Compile error: "Invalid inside procedure", highlighting: - Public Function MINUTEOUTCOME(OUTCOME, SchoolType, School, PrimarySecondary, YearAppliedFor) As String
Problem Solved!
My 'Select Case' should have read 'Outcome' rather than 'MinuteOutcome'
:)
ChipR 1,287
Recognized Expert Top Contributor
It goes at the very top of every module after Option Compare Database. Glad you got it working in the meantime.
MMcCarthy 14,534
Recognized Expert Moderator MVP
For some strange reason in recent versions of Access Microsoft doesn't set this by default. ( A very bad thing in my opinion as it would save people a lot of heartache).
Open the VB Editor window and go to Tools - Options. Tick the box beside "Require Variable Declaration". This will ensure that all modules, form modules, classes etc. will automatically have "Option Explicit" put in. All this means is you can't use a variable unless you declare it. Common Sense really.
Mary
NeoPa 32,579
Recognized Expert Moderator MVP Require Variable Declaration may help.
The reason Microsoft have the default set to omit this very important line is that it helps to hook the inexperienced into the game. The first steps are easier. If it causes great problems later on then clearly they are not picking up the pieces ;)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: wireless200 |
last post by:
I've got a table with some datetime fields in it.
One field (call it field 1) is of the form mm/dd/yyyy and the other two
(fields 2 and 3) are in the form of hh:mm:ss:xx where xx is hundreths
of a second.
I'm getting the difference between field 2 and 3 using (datediff(ms,
access_time, release_time )/1000/60.). This seems to work fine.
However, in some other cases I'd like to add field 1 to field 2 and
|
by: Justin Lazanowski |
last post by:
Cross posting this question on the recommendation of an
I have a .NET application that I am developing in C# I am loading
information in from a dataset, and then pushing the dataset to a grid, or
other controls depending on the particular form. This application is setup
with one MDI parent calling MDI children with the exception of one Modal
form (the report viewer).
When I run the application and run one of the screens that pulls...
|
by: Terentius Neo |
last post by:
Is it possible to combine (in DB2 UDB 8.1) a stored procedure and a
select statement? I mean something like this:
Select
c.number,
call procedure( c.number ) as list
from
table c
With best regards
|
by: misschristalee |
last post by:
I'm having a brain blockage day....
Scenario:
Search Form with 6 text boxes
Query has same six fields
Each has this IIF: IIf(IsNull(!!),"",!!)
with each dictating the correct text box of course.
SQL dictates... If text box 1 isNull do nothing or do this OR if text
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on where the job is
running, the job runs sucessfully, PDF files got generated, everything
is good. If I scheduled the job to run at the time that I am not
logged into the server, Access is not able to print to the printer.
The error is pretty...
| |
by: shripaldalal |
last post by:
hi all,
i have the following fields....
Document_Name, Document_No, Document_Date, Order_No, Order_Date,
Peripheral
The first 5 you can understand, peripheral is a memo field which
contains all less important (but important!) details like Address1,
Address2, Place_Of_Delivery in a comma delimited string such as:
|
by: elitecodex |
last post by:
Hey everyone. I have this query
select * from `TableName` where `SomeIDField` 0
I can open a mysql command prompt and execute this command with no
issues. However, Im trying to issue the same command inside of
mysql_real_query and I keep on getting this error back.
"You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
|
by: fidgen |
last post by:
Hiya,
I'm trying to get a AJAX driven update to my list of news articles, so
when users click the title of the news article, it pops up the article
content in a thickbox overlay. Retrieving content from the database
via AJAX is no problem, that works and thickbox works too, I'm just
having problems getting them both running together! It seems like it's
too much information to cram into one poor little "a href=".... the
"onclick"...
|
by: BOMEz |
last post by:
So i've recently been starting to program PHP in an object oriented way, but I'm running into some difficulties in from a design stand point and from an object oriented stand point:
Issue 1: In my class I cannot give visibility to any variable, it simple breaks everything. For example if I do: private $private = 'Private'; I get the error :
The error is the same if I use public or protected. I have tried declaring a a private variable in...
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |