hello
i have your basic select case question. i created a combo box and save
it as a query. so whenever the user selects the value and clicks the
export button, the select case should then export the data. however,
it does not export the it. so then i converted the export macro to VB
and used "call" to call function but it did not work. what am i doing
wrong or more precisely what am i leaving out?
thanks in advance,
jung
here is the code:
Private Sub btnExportReport s_DblClick(Canc el As Integer)
'Select which DDA Account will be exported to the C:\Program
Files\RECON\RND I directory
Dim qry As String
Dim qryCboDDAAccoun t As Recordset
qry = "qryCboDDAAccou nt"
DoCmd.OpenQuery "qryCboDDAAccou nt"
Select Case qry
Case "BM2"
Call mBM2Export
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedBM2 ",
"C:\Program Files\RECON\RND I\BM2.xls", True, ""
Case "BM20"
Call mBM20Export
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedBM2 0",
"C:\Program Files\RECON\RND I\BM20.xls", True, ""
Case "CM"
Call mCMExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" ,
"C:\Program Files\RECON\RND I\CM.xls", True, ""
Case "CU"
Call mCUExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" ,
"C:\Program Files\RECON\RND I\CM.xls", True, ""
Case "DEC"
Call mDECExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" ,
"C:\Program Files\RECON\RND I\CM.xls", True, ""
Case "MABS"
Call mMABSExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedMAB S",
"C:\Program Files\RECON\RND I\MABS.xls", True, ""
Case "RBANK"
Call mRBANKExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedRBA NK",
"C:\Program Files\RECON\RND I\RBANK.xls", True, ""
Case "SF"
Call mSFExport
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedSF" ,
"C:\Program Files\RECON\RND I\SF.xls", True, ""
Case "SF2"
Call mSF2Export
'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedSF2 ",
"C:\Program Files\RECON\RND I\SF2.xls", True, ""
End Select
DoCmd.Close '"qryCboDDAAcco unt"
End Sub 2 7147
On 19 Nov 2003 13:41:52 -0800, pi******@yahoo. fr (JMCN) wrote in
comp.databases. ms-access: hello i have your basic select case question. i created a combo box and save it as a query. so whenever the user selects the value and clicks the export button, the select case should then export the data. however, it does not export the it. so then i converted the export macro to VB and used "call" to call function but it did not work. what am i doing wrong or more precisely what am i leaving out?
thanks in advance, jung
here is the code:
Private Sub btnExportReport s_DblClick(Canc el As Integer)
'Select which DDA Account will be exported to the C:\Program Files\RECON\RN DI directory Dim qry As String Dim qryCboDDAAccoun t As Recordset
qry = "qryCboDDAAccou nt" DoCmd.OpenQuer y "qryCboDDAAccou nt" Select Case qry
Case "BM2" Call mBM2Export 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedBM2 ", "C:\Program Files\RECON\RND I\BM2.xls", True, "" Case "BM20" Call mBM20Export 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedBM2 0", "C:\Program Files\RECON\RND I\BM20.xls", True, "" Case "CM" Call mCMExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" , "C:\Program Files\RECON\RND I\CM.xls", True, "" Case "CU" Call mCUExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" , "C:\Program Files\RECON\RND I\CM.xls", True, "" Case "DEC" Call mDECExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedCM" , "C:\Program Files\RECON\RND I\CM.xls", True, "" Case "MABS" Call mMABSExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedMAB S", "C:\Program Files\RECON\RND I\MABS.xls", True, "" Case "RBANK" Call mRBANKExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedRBA NK", "C:\Program Files\RECON\RND I\RBANK.xls", True, "" Case "SF" Call mSFExport 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedSF" , "C:\Program Files\RECON\RND I\SF.xls", True, "" Case "SF2" Call mSF2Export 'DoCmd.Transfer Spreadsheet acExport, 8, "qryCombinedSF2 ", "C:\Program Files\RECON\RND I\SF2.xls", True, ""
End Select
DoCmd.Close '"qryCboDDAAcco unt"
End Sub
Huh?
Why not just use a form with a combobox that has the query as its
recordsource. Then, in the afterupdate even procedure of the combobox
(let's pretend its called 'cboAcct'), just put:
Private Sub cboAcct_AfterUp date()
DoCmd.TransferS preadsheet acExport, 8, "qryCombine d" & cboAcct, _
"C:\Program Files\RECON\RND I\" & cboAcct & ".xls", True, ""
end sub
Wouldn't that be a hell of a lot easier?
Peter Miller
_______________ _______________ _______________ _______________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
> Huh? Why not just use a form with a combobox that has the query as its recordsource. Then, in the afterupdate even procedure of the combobox (let's pretend its called 'cboAcct'), just put:
Private Sub cboAcct_AfterUp date() DoCmd.TransferS preadsheet acExport, 8, "qryCombine d" & cboAcct, _ "C:\Program Files\RECON\RND I\" & cboAcct & ".xls", True, "" end sub
Wouldn't that be a hell of a lot easier?
Peter Miller _______________ _______________ _______________ _______________ PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL Free quotes, Guaranteed lowest prices and best results www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Wouldn't that be a hell of a lot easier?
good point peter. thanks for the suggestion. i just figured that the
select case would have been an answer since the users would select it
by the combo box but i guess not. thanks again.
jung This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve Jorgensen |
last post by:
I just got paid to solve this problem for one client, so I might be impeding
future business opportunities by sharing this secret, but a rising tide floats
all boats, so... I've seen this mysterious problem now in many Access C/S
applications. Usually some random GUI or workflow changes make the problem,
but for at least one of my clients, the problem was chronic.
You have an Access form bound to a linked SQL Server table. You try to...
|
by: alwayshouston |
last post by:
Hi All!
I am working on this very small database and I am confused in the
designing a simple form. I only have three tables in the database.
First Table: tblExpense
Columns: ExpenseID ; ExpenseType
Data:
1 ; FOOD
2 ; AIRLINE
3 ; FARE
|
by: egoldthwait |
last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a
Citrix farm. The issue: we have never converted an Access Db to Oracle
but can probably use Oracle's Workbench to assist with this. Also - the
citrix folks do not want us to keep the FE in Access as the queries and
other activities consume a lot of power. The users will be in 3
different offices across the globe all accessing the 1 Oracle DB in
Citrix.
Does anyone have...
|
by: gsb58 |
last post by:
Hi!
Recently we, in Norway changed to three different VAT levels. All three
needs to be on the invoice program. This is easy obtained via a new
field and set the rowsource to valuelist and make the three values :
0;0,00;0,06;0,12;0,25.
However my problem is calculating the orderlines and make them be
summed in a textbox in the footer of the frmOrderlines.
|
by: Joseph Macari |
last post by:
I recently installed Access 2007; I've been a long time user of access (from
ver 1 ). The following code snippet is giving me fits-
<<
Select Case myTide
Case 1
Select Case myTideStage
Case 1
MsgBox "Tide Stage must be either After Low or Before High"
Me! = " "
| |
by: pic078 via AccessMonster.com |
last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files)
that remains stuck in task manager after exiting the application - you can't
reopen database after exiting as a result - I have read every post out there
and spent hours trying to figure out the problem with no success whatsoever -
I have constrained the problem to one form however, and I think it's hiding
somewhere in my code associated with this form, which is...
|
by: Lysander |
last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article.
For a combo or list box, the source data is normally a Table/Query. Or it could be a value list, a static list of data.
But what if your information is not held in a table, and it is not a static list.
Examples I have used have been, “next 100 prime numbers after this one”, “Every third Friday from start of...
|
by: G04 |
last post by:
Hi All,
I have a continuous form with all records. For each field there is a combo in the form header and the form also contains a Toggle button "Apply Filter".
When clicked, it changes to "Cancel Filter".
Then an SQL string with condition meeting the criteria input in the combo boxes is built.
I have noticed that when certain fields are not filled in (no space, nothing), the record is simply not shown. The empty field is not necessarily...
|
by: giandeo |
last post by:
Hello Experts.
Could you find a solution for this problem please!
I have the following tables in Access Database
Table Name: origin
Fields Names: country, countrycode
Table Name: make
Fields Names: countrycode, make
|
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: 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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |