Advertisement

05.16.2008 at 11:55AM PDT, ID: 23409402
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Modify Query SQL Dynamically

Tags: MS, Access, 97
I'm writing some script to add/remove functions from my database.  To do this, the script has to:
1) Add textboxes / labels to multiple forms/reports.
2) Populate a row of data in one table.
3) Add 2 columns in another table.
4) Modify 1-2 SQL statements to include the new function.

I am almost finished with 1-3, but am having trouble with 4.

How do I modify a SQL statement from an access module?
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: SeanStrickland
Solution Provided By: GRayL
Participating Experts: 3
Solution Grade: A
Views: 12
Translate:
Loading Advertisement...
05.16.2008 at 11:56AM PDT, ID: 21585440

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 12:13PM PDT, ID: 21585553

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 12:21PM PDT, ID: 21585631

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 01:05PM PDT, ID: 21585986

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 01:09PM PDT, ID: 21586021

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 01:26PM PDT, ID: 21586166

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 01:53PM PDT, ID: 21586353

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 02:02PM PDT, ID: 21586410

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.20.2008 at 04:48PM PDT, ID: 21611217

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
05.16.2008 at 11:56AM PDT, ID: 21585440
Small portion / sample of the SQL statement being modified.  It uses many many sums, and a few expressions.  I would need to add Sum and Group By fields to this query.

SELECT tbl_ProductionDates.Number, tbl_ProductionDates.Week, tbl_ProductionDates.Month, tbl_Specialist.Team_Number, tbl_Specialist.E_Number, tbl_Specialist.Supervisor, tbl_Specialist.Specialist, tbl_Specialist.Date_In_Position, tbl_Specialist.Desk_Code, tbl_Specialist.Position, Sum(tbl_Completes.time_PTO_hrs) AS time_PTO_hrs, Sum(tbl_Completes.time_mtg_hrs) AS time_mtg_hrs, Sum(tbl_Completes.time_class_hrs) AS time_class_hrs, Sum(tbl_Completes.time_holiday_hrs) AS time_holiday_hrs, Sum(tbl_Completes.time_special_project_hrs) AS time_special_project_hrs, Sum(tbl_Completes.time_system_downtime_hrs) AS time_system_downtime_hrs, Sum(tbl_Completes.time_hrs_worked) AS time_hrs_worked, IIf([time_hrs_worked]>40,IIf(([time_hrs_worked]-40)>0,([time_hrs_worked]-40),0),0) AS Overtime, Sum(tbl_Completes.prod_sng) AS prod_sng, Sum(tbl_Completes.dp_sng) AS dp_sng, Sum(tbl_Completes.time_sng) AS time_sng, Sum(tbl_Completes.prod_paper) AS prod_paper, Sum(tbl_Completes.dp_paper) AS dp_paper, Sum(tbl_Completes.time_paper) AS time_paper, Sum(tbl_Completes.prod_pended) AS prod_pended, Sum(tbl_Completes.dp_pended) AS dp_pended, Sum(tbl_Completes.time_pended) AS time_pended
 
05.16.2008 at 12:13PM PDT, ID: 21585553

Rank: Genius

You have to complete the FROM and JOINS.  The GROUP BY is simply all the fields in the SELECT clause that are not aggregates - it looks like those up to tbl_Specialist.Position.  Its scary to see things like Week and Month in tbl_ProductionDates - is there not a date field from which those values can be derived?
 
05.16.2008 at 12:21PM PDT, ID: 21585631
I have that, I only posted a piece of the SQL, the full SQL is at the bottom of this post.  I unfortunately have to have the tbl_ProductionDates table to break down Fiscal months, production weeks (different from normally numbered weeks), and holidays for automation and reporting.  For this reason, Week and Month are linked for sorting/grouping in reports.

SELECT tbl_ProductionDates.Number, tbl_ProductionDates.Week, tbl_ProductionDates.Month, tbl_Specialist.Team_Number, tbl_Specialist.EmpID, tbl_Specialist.Supervisor, tbl_Specialist.Specialist, tbl_Specialist.Date_In_Position, tbl_Specialist.Desk_Code, tbl_Specialist.Position, Sum(tbl_Completes.time_PTO_hrs) AS time_PTO_hrs, Sum(tbl_Completes.time_mtg_hrs) AS time_mtg_hrs, Sum(tbl_Completes.time_class_hrs) AS time_class_hrs, Sum(tbl_Completes.time_holiday_hrs) AS time_holiday_hrs, Sum(tbl_Completes.time_special_project_hrs) AS time_special_project_hrs, Sum(tbl_Completes.time_system_downtime_hrs) AS time_system_downtime_hrs, Sum(tbl_Completes.time_hrs_worked) AS time_hrs_worked, IIf([time_hrs_worked]>40,IIf(([time_hrs_worked]-40)>0,([time_hrs_worked]-40),0),0) AS Overtime, Sum(tbl_Completes.prod_Auto) AS prod_Auto, Sum(tbl_Completes.dp_Auto) AS dp_Auto, Sum(tbl_Completes.time_Auto) AS time_Auto, Sum(tbl_Completes.prod_paper) AS prod_paper, Sum(tbl_Completes.dp_paper) AS dp_paper, Sum(tbl_Completes.time_paper) AS time_paper, Sum(tbl_Completes.prod_pended) AS prod_pended, Sum(tbl_Completes.dp_pended) AS dp_pended, Sum(tbl_Completes.time_pended) AS time_pended, Sum(tbl_Completes.prod_correspondence) AS prod_correspondence, Sum(tbl_Completes.dp_correspondence) AS dp_correspondence, Sum(tbl_Completes.time_correspondence) AS time_correspondence, Sum(tbl_Completes.prod_underwriting) AS prod_underwriting, Sum(tbl_Completes.dp_underwriting) AS dp_underwriting, Sum(tbl_Completes.time_underwriting) AS time_underwriting, Sum(tbl_Completes.prod_SIC) AS prod_SIC, Sum(tbl_Completes.dp_SIC) AS dp_SIC, Sum(tbl_Completes.time_SIC) AS time_SIC, Sum(tbl_Completes.prod_welcome_call) AS prod_welcome_call, Sum(tbl_Completes.dp_welcome_call) AS dp_welcome_call, Sum(tbl_Completes.time_welcome_call) AS time_welcome_call, Sum(tbl_Completes.prod_new_accounts) AS prod_new_accounts, Sum(tbl_Completes.dp_new_accounts) AS dp_new_accounts, Sum(tbl_Completes.time_new_accounts) AS time_new_accounts, Sum(tbl_Completes.prod_reissue) AS prod_reissue, Sum(tbl_Completes.dp_reissue) AS dp_reissue, Sum(tbl_Completes.time_reissue) AS time_reissue, Sum(tbl_Completes.prod_life) AS prod_life, Sum(tbl_Completes.dp_life) AS dp_life, Sum(tbl_Completes.time_life) AS time_life, Sum(tbl_Completes.prod_paper_conversion) AS prod_paper_conversion, Sum(tbl_Completes.dp_paper_conversion) AS dp_paper_conversion, Sum(tbl_Completes.time_paper_conversion) AS time_paper_conversion, Sum(tbl_Completes.prod_Auto_conversion) AS prod_Auto_conversion, Sum(tbl_Completes.dp_Auto_conversion) AS dp_Auto_conversion, Sum(tbl_Completes.time_Auto_conversion) AS time_Auto_conversion, Sum(tbl_Completes.prod_management_file) AS prod_management_file, Sum(tbl_Completes.dp_management_file) AS dp_management_file, Sum(tbl_Completes.time_management_file) AS time_management_file, Sum(tbl_Completes.prod_nonumber) AS prod_nonumber, Sum(tbl_Completes.dp_nonumber) AS dp_nonumber, Sum(tbl_Completes.time_nonumber) AS time_nonumber, Sum(tbl_Completes.prod_paper_paid) AS prod_paper_paid, Sum(tbl_Completes.dp_paper_paid) AS dp_paper_paid, Sum(tbl_Completes.time_paper_paid) AS time_paper_paid, Sum(tbl_Completes.prod_pended_paid) AS prod_pended_paid, Sum(tbl_Completes.dp_pended_paid) AS dp_pended_paid, Sum(tbl_Completes.time_pended_paid) AS time_pended_paid, Sum(tbl_Completes.prod_paper_cod) AS prod_paper_cod, Sum(tbl_Completes.dp_paper_cod) AS dp_paper_cod, Sum(tbl_Completes.time_paper_cod) AS time_paper_cod, Sum(tbl_Completes.prod_escalation_file) AS prod_escalation_file, Sum(tbl_Completes.dp_escalation_file) AS dp_escalation_file, Sum(tbl_Completes.time_escalation_file) AS time_escalation_file, Sum(tbl_Completes.prod_DOI_file) AS prod_DOI_file, Sum(tbl_Completes.dp_DOI_file) AS dp_DOI_file, Sum(tbl_Completes.time_DOI_file) AS time_DOI_file, Sum(tbl_Completes.prod_rush_file) AS prod_rush_file, Sum(tbl_Completes.dp_rush_file) AS dp_rush_file, Sum(tbl_Completes.time_rush_file) AS time_rush_file, Sum(tbl_Completes.prod_specialty_Auto) AS prod_specialty_Auto, Sum(tbl_Completes.dp_specialty_Auto) AS dp_specialty_Auto, Sum(tbl_Completes.time_specialty_Auto) AS time_specialty_Auto, Sum(tbl_Completes.prod_specialty_paper) AS prod_specialty_paper, Sum(tbl_Completes.dp_specialty_paper) AS dp_specialty_paper, Sum(tbl_Completes.time_specialty_paper) AS time_specialty_paper, Sum(tbl_Completes.prod_specialty_Auto_conversions) AS prod_specialty_Auto_conversions, Sum(tbl_Completes.dp_specialty_Auto_conversions) AS dp_specialty_Auto_conversions, Sum(tbl_Completes.time_specialty_Auto_conversions) AS time_specialty_Auto_conversions, Sum(tbl_Completes.prod_rework) AS prod_rework, Sum(tbl_Completes.dp_rework) AS dp_rework, Sum(tbl_Completes.time_rework) AS time_rework, tbl_Specialist.[Auto Quota], tbl_Specialist.[Paper Quota], tbl_Specialist.[Pended Quota], tbl_Specialist.[Correspondence Quota], tbl_Specialist.[Underwriting Quota], tbl_Specialist.[SIC Quota], tbl_Specialist.[Welcome Call Quota], tbl_Specialist.[New Accounts Quota], tbl_Specialist.[Reissue Quota], tbl_Specialist.[Life Quota], tbl_Specialist.[Paper Conversion Quota], tbl_Specialist.[Auto Conversion Quota], tbl_Specialist.[Management File Quota], tbl_Specialist.[NoNumber Quota], tbl_Specialist.[Paper Paid Quota], tbl_Specialist.[Pended Paid Quota], tbl_Specialist.[Paper COD Quota], tbl_Specialist.[Escalation File Quota], tbl_Specialist.[DOI File Quota], tbl_Specialist.[Rush File Quota], tbl_Specialist.[Specialty Auto Quota], tbl_Specialist.[Specialty Paper Quota], tbl_Specialist.[Specialty Auto Conversion Quota], tbl_Specialist.[Rework Quota], (([Correspondence Quota]*[time_correspondence])+([DOI File Quota]*[time_DOI_file])+([Escalation File Quota]*[time_escalation_file])+([Life Quota]*[time_life])+([Management File Quota]*[time_management_file])+([New Accounts Quota]*[time_new_accounts])+([NoNumber Quota]*[time_nonumber])+([Paper COD Quota]*[time_paper_cod])+([Paper Conversion Quota]*[time_paper_conversion])+([Paper Paid Quota]*[time_paper_paid])+([Paper Quota]*[time_paper])+([Pended Paid Quota]*[time_pended_paid])+([Pended Quota]*[time_pended])+([Reissue Quota]*[time_reissue])+([Rework Quota]*[time_rework])+([Rush File Quota]*[time_rush_file])+([SIC Quota]*[time_SIC])+([Auto Conversion Quota]*[time_Auto_conversion])+([Auto Quota]*[time_Auto])+([Specialty Paper Quota]*[time_specialty_paper])+([Specialty Auto Conversion Quota]*[time_specialty_Auto_conversions])+([Specialty Auto Quota]*[time_specialty_Auto])+([Underwriting Quota]*[time_underwriting])+([Welcome Call Quota]*[time_welcome_call])) AS ExpectedProd, tbl_Specialist.[Marketing Request], tbl_Specialist.[Marketing Request Quota], tbl_Completes.prod_marketing_request, tbl_Completes.dp_marketing_request, tbl_Completes.time_marketing_request
FROM (tbl_Completes INNER JOIN tbl_ProductionDates ON tbl_Completes.prod_date = tbl_ProductionDates.Day) INNER JOIN tbl_Specialist ON tbl_Completes.prod_EmpID = tbl_Specialist.EmpID
GROUP BY tbl_ProductionDates.Number, tbl_ProductionDates.Week, tbl_ProductionDates.Month, tbl_Specialist.Team_Number, tbl_Specialist.EmpID, tbl_Specialist.Supervisor, tbl_Specialist.Specialist, tbl_Specialist.Date_In_Position, tbl_Specialist.Desk_Code, tbl_Specialist.Position, tbl_Specialist.[Auto Quota], tbl_Specialist.[Paper Quota], tbl_Specialist.[Pended Quota], tbl_Specialist.[Correspondence Quota], tbl_Specialist.[Underwriting Quota], tbl_Specialist.[SIC Quota], tbl_Specialist.[Welcome Call Quota], tbl_Specialist.[New Accounts Quota], tbl_Specialist.[Reissue Quota], tbl_Specialist.[Life Quota], tbl_Specialist.[Paper Conversion Quota], tbl_Specialist.[Auto Conversion Quota], tbl_Specialist.[Management File Quota], tbl_Specialist.[NoNumber Quota], tbl_Specialist.[Paper Paid Quota], tbl_Specialist.[Pended Paid Quota], tbl_Specialist.[Paper COD Quota], tbl_Specialist.[Escalation File Quota], tbl_Specialist.[DOI File Quota], tbl_Specialist.[Rush File Quota], tbl_Specialist.[Specialty Auto Quota], tbl_Specialist.[Specialty Paper Quota], tbl_Specialist.[Specialty Auto Conversion Quota], tbl_Specialist.[Rework Quota], tbl_Specialist.[Marketing Request], tbl_Specialist.[Marketing Request Quota], tbl_Completes.prod_marketing_request, tbl_Completes.dp_marketing_request, tbl_Completes.time_marketing_request
HAVING (((tbl_Specialist.EmpID)="9332"))
ORDER BY tbl_ProductionDates.Number, tbl_ProductionDates.Week;
 
05.16.2008 at 01:05PM PDT, ID: 21585986

Rank: Genius

>4) Modify 1-2 SQL statements to include the new function.
Instead of editing a query, a better idea would be to delete the query from your destination database, then add the (new) query from wherever into that destination database.
 
05.16.2008 at 01:09PM PDT, ID: 21586021

Rank: Guru

SeanStrickland,
What you asked for can be done.
I recommend breaking this query to few sub queries.
 
05.16.2008 at 01:26PM PDT, ID: 21586166
So the best way would be to delete the query and rebuild it through querydefs?  I can't break it down as it's needed for a fairly complex report.

Is this solution viable for a multi-user environment?  This query runs certain reports that can be pulled at any time by anyone that has access to the database.  There would be moments in time where a user could be running this report while another user is adding/removing a function from the database (deleting/creating a new query), and the report would give an error.
 
05.16.2008 at 01:53PM PDT, ID: 21586353

Rank: Genius

Going back to the question, 4) Modify 1-2 SQL statements to include the new function.

What do you need to add - what is the new function?  Rather that modify the existing query, might it not be easier to delete the old and bring in the new?
 
05.16.2008 at 02:02PM PDT, ID: 21586410

Rank: Genius

As to how do I modify an SQL statement from a module:

Public Sub ModQuery()
Dim StrOld as String, strNew as String, db as Database, qd as QueryDef
Set db=CurrentDB
StrNew = "One huge big string with the new function"
Set qd=db.QueryDefs("myBigQuery")
qd.SQL=StrNew
db.querydefs.refresh
set qd = nothing
db.close
End Sub
Accepted Solution
 
05.20.2008 at 04:48PM PDT, ID: 21611217

Rank: Genius

Thanks, glad it was of some use.
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628