Dear Friends,
kindly help me in correcting the following code
This code is for printing the report from the combo box after selection which connects to different reports as selected. I have written this code behind the combo box. - Private Sub Bank_Name_AfterUpdate()
-
-
Dim rpt As String
-
-
rpt = Bank_Name.AfterUpdate()
-
-
If rpt = "Andhra Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Andhra Bank", acPreview
-
-
ElseIf rpt = "Canara Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Canara Bank", acPreview
-
-
ElseIf rpt = "Central Bank of India" Then
-
DoCmd.OpenReport "Cheque Printing - Central Bank of India", acPreview
-
-
ElseIf rpt = "IDBI Bank" Then
-
DoCmd.OpenReport "Cheque Printing - IDBI Bank", acPreview
-
-
ElseIf rpt = "Indian Overseas Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Indian Overseas Bank", acPreview
-
-
ElseIf rpt = "Indusind Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Indusind Bank", acPreview
-
-
ElseIf rpt = "Ing Vysya Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Ing Vysya Bank", acPreview
-
-
ElseIf rpt = "Union Bank of India" Then
-
DoCmd.OpenReport "Cheque Printing - Union Bank of India", acPreview
-
-
End If
-
-
End Sub
Please help me in correcting the code and i want whenvever they select the bank name it should go to the report which is created agains that bank.
Help requried urgencly.
Thanks & Regards,
Srinivas
1 1699 Rabbit 12,516
Recognized Expert Moderator MVP
Dear Friends,
kindly help me in correcting the following code
This code is for printing the report from the combo box after selection which connects to different reports as selected. I have written this code behind the combo box. - Private Sub Bank_Name_AfterUpdate()
-
-
Dim rpt As String
-
-
rpt = Bank_Name.AfterUpdate()
-
-
If rpt = "Andhra Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Andhra Bank", acPreview
-
-
ElseIf rpt = "Canara Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Canara Bank", acPreview
-
-
ElseIf rpt = "Central Bank of India" Then
-
DoCmd.OpenReport "Cheque Printing - Central Bank of India", acPreview
-
-
ElseIf rpt = "IDBI Bank" Then
-
DoCmd.OpenReport "Cheque Printing - IDBI Bank", acPreview
-
-
ElseIf rpt = "Indian Overseas Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Indian Overseas Bank", acPreview
-
-
ElseIf rpt = "Indusind Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Indusind Bank", acPreview
-
-
ElseIf rpt = "Ing Vysya Bank" Then
-
DoCmd.OpenReport "Cheque Printing - Ing Vysya Bank", acPreview
-
-
ElseIf rpt = "Union Bank of India" Then
-
DoCmd.OpenReport "Cheque Printing - Union Bank of India", acPreview
-
-
End If
-
-
End Sub
Please help me in correcting the code and i want whenvever they select the bank name it should go to the report which is created agains that bank.
Help requried urgencly.
Thanks & Regards,
Srinivas
rpt = Bank_Name.After Update()
That's the problem. You're setting rpt to either [Event Procedure] or the return value of the sub which should create some sort of infinite loop.
What you want to set it to is the value entered in Bank_Name which would be:
rpt = Me.Bank_Name
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: James Walker |
last post by:
Can some one help I get an error of 'checkIndate' is null or not an object
can someone please help. I can't work out why
Thanks in advance
James
<form>
<td height="24" colspan="7" valign="top"><form name="booknow"><select
|
by: gsb |
last post by:
Don't know if this is the right place to post this JavaScript issue.
If not, could someone point me in the right direction please.
I am trying to make a "cross browser compliant" floating iFrame.
Not real fancy, just load, resize and move.
But, I do not have the browsers, OSs and different machines (like Mac) to
test the code on.
So I need some help to see where this basic example of works and does not
work.
|
by: Dave Anderson |
last post by:
I've done a bunch of googling and searched all the references I've got
without finding anything that seems relevant to this issue; I'd
appreciate any useful pointers or constructive comments.
I've got a page at <http://www.nesfa.org/rules/code-s1.html> which makes
extensive use of anchors within the page. Every other browser I've
tried deals with them just fine, but (at least recent versions of) IE
acts as though they didn't exist --...
|
by: Emmet Caulfield |
last post by:
In the course of examining the code for an Internet-connected
authentication server, I came across the following code (twice in one
function with different constants in the "if") in a file of some 2000
non-comment lines written by a "C" expert:
if( elem->tag == SOME_MANIFEST_CONSTANT ) /* Alt */
{
char *tempValue = malloc(32);
strcpy(tempValue, elem->value);
while( tempValue == '0' )
|
by: nichas |
last post by:
what does this part of the code mean.. iam not getting it..
............
typedef int RowArray;
RowArray *rptr;
...............
i didnt get this.. please reply fast...thank you.
| |
by: |
last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled
within Visual Studio .NET 2003). Am trying to link simple c++ code to
fortran dlls created in Compaq Visual Fortran (v6.1). Posts concerning
this topic are common, but none of the posted solutions I've tried work
correctly with the above software. The linker can't seem to find the dll
(reports 'unresolved external symbol __imp__IMSL_FUN@8'; IMSL_FUN.dll is
the f77...
|
by: Frank |
last post by:
I've done this a few times.
In a solution I have a project, Say P1, and need another project that will
contain much code that is similar to that of P1.
I hope no one gets hung up on why I don't somehow share the code.
So, I copy the folder P1 is in, change the new folder name, and is VS2005 to
change all occurrences of P1's name tp P2's name.
|
by: JamesG |
last post by:
I'm trying to convert a unix timestamp to a readable time, such as 4
hours ago, or 25 minutes ago.
My code is below:
function ago($ts) {
/* time difference */
$ts = (time() - $ts);
if($ts < 60) {
/* <1 minute */
|
by: iahamed |
last post by:
Hi Everyone,
I got two parts of my advance search to work, I am running out of Logic to
connect the third. My mind is in swing! Pleaseeeeeeeee Help me.
I have 3 Fiels to search, the First two works, thats:
1. Category to search from the (Drop down name: ASPDBCatSearch) is working
with the Input Text Box Field (name: keyword), based on Whatever selection on
the Drop down value selection:
|
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: 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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |