Macro to connect to Access Database to get to data - Minitab Macro help

M

minitabuser

#1
hello,
I just started using the minitab macros. I need help. I want to write the macro to connect to Access Database to get to data and produce charts (after doing some calculation on the columns in the dataset). I can do this successbully if I hard code what I want to filter for. Now I want to change the code where I can ask the user to enter TEACHER's name and pull data only for that teacher and produce chart. can someone help?

initial code with hard coding that works is below:
gmacro
report1a
ODBC;
Connect "DSN=MS Access Database;DBQ=C:\Documents and Settings\kab0408\Deskt" &
"op\new database\Project Tracker\Project Tracker.mdb;DefaultDir=C:\Document" &
"s and Settings\kab0408\Desktop\new database\Project Tracker;DriverId=25;FI" &
"L=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;";
SQLString "SELECT `Accomplishments`,`Active Step`,`Actual Savings`,`Analyze" &
" Gate Review`,`Baseline Capability`,`Baseline Process Knowledge`,`Business" &
" Area`,`Business Case`,`Champion`,`Champion (Investment)`,`Control Gate Re" &
"view`,`Core Team`,`Cost Category`,`Date`,`Define Gate Review`,`Driver`,`Ex" &
"pected Savings`,`Future Action Items`,`Goals`,`Green Belt (Investment)`,`I" &
"mpact`,`Improve Gate Review`,`Improved Capability`,`Key Metrics`,`Key Stak" &
"eholders`,`Learning System`,`Measure Gate Review`,`Measurement Analysis`,`" &
"Name`,`Optimal Process Condition`,`Percent Complete`,`Prioritized Factors`" &
",`Problem`,`Process or Product`,`Process Validation Results`,`Project Clos" &
"e Date`,`Project Closure Notes`,`Project Level`,`Project Number`,`Project " &
"Start Date`,`Project Status`,`Project Title`,`Project Type`,`Risks & Barri" &
"ers`,`Root Cause Detail`,`Savings Type`,`Selection & Scoping`,`Side Effect" &
" Analysis`,`Supporting File Location`,`Teacher`,`Team (Investment)`,`Team " &
"PIN`,`Time Commitment`,`Validation Date`,`Week Number` FROM `Data 1` where" &
" `Teacher` = 'KB' ".
Subset;
Where " 'Project Status'=""Proving Out"" Or 'Project Status'=""Complete"" And 'Active " &
"Step' <> ""x cancelled""";
Note ** Where "'Project Status'=""Proving Out""";
Name "Data Subset for teacher";
NoMatrices;
NoConstants;
Include.
NOTE Results for: Data Subset for teacher
NOTE *** Data window was used to change the worksheet
Sort 'Accomplishments'-C55 'Accomplishments'-C55;
By 'Project Start Date'.

Let C56 = ('Control Gate Review'-'Project Start Date')/30
TSPlot C56;
Stamp 'Project Start Date';
Symbol 'Project Level';
Connect 'Project Level'.
EndMacro


Also where can I find a good resource on syntax and advanced macro?

thanks for help.
 
Elsmar Forum Sponsor
G

GoLions

#2
It sounds like you are looking for the SET command. For example, here are commands to prompt a user for the name of a histogram:

Note 'What is your title?'
Set c1000; #c1000 should be empty so it's not overwritten
File "terminal";
Format (A50);
Nobs 1.
Copy c1000 k1;
Use 1.
hist c1;
title k100.

In Minitab, enter the command "help session" to get to the command help. Also, Minitab offers free tech support (814-231-2682).
 
Thread starter Similar threads Forum Replies Date
V Minitab GRR crossed Xbar and r method macro needed Using Minitab Software 9
Q QI Macro Histogram - Can someone define *sorted data*? Capability, Accuracy and Stability - Processes, Machines, etc. 7
D minitab macro to pull access query with parameters Using Minitab Software 1
J Macro Question: Get Column Name by Column Number / or Use Text constant to link on a Using Minitab Software 1
V Validation of macro - scripts - programs used in statistical software (Minitab-SAS... Qualification and Validation (including 21 CFR Part 11) 5
F Run Minitab Macro from Excel Using Minitab Software 3
M Minitab macro to add reference line to graph Using Minitab Software 1
M Writing a Minitab macro that can manipulate data in all columns Using Minitab Software 3
L Webcam with Macro Capability for Skype between our facility and a satellite location Inspection, Prints (Drawings), Testing, Sampling and Related Topics 2
B Macro Process Mapping (pre-GAP analysis) ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 3
B Using a File Name as a Variable in an Excel Macro Excel .xls Spreadsheet Templates and Tools 11
J Excel Macros - "Button" on a form that executes a macro Excel .xls Spreadsheet Templates and Tools 8
M Insert Empty Column Using Minitab Macro Using Minitab Software 2
B Wheeler Honest Gauge R&R macro wanted Excel .xls Spreadsheet Templates and Tools 2
B Minitab R14 macro for Power Analysis Using Minitab Software 1
T Minitab - Getting a Minitab Macro to look up a Column Name Using Minitab Software 23
M Minitab Macro-Command 'NUMERIC' to convert a text column to an numeric column Using Minitab Software 8
M Minitab 15 - READ, SET from keyboard or file doesn't work in my macro Using Minitab Software 4
A Process Mapping - for "Audits" - Detailed process map + macro map + FMEA Process Maps, Process Mapping and Turtle Diagrams 10
M Macro to fill up columns when shorter then others Using Minitab Software 4
J RANCOVA (rank ANCOVA) macro for minitab Using Minitab Software 2
M Problem creating a Macro in Minitab Using Minitab Software 4
A A macro-process structure approach to auditing for ISO 9001:2000(8) General Auditing Discussions 19
M Minitab macro vs. Layout tool Using Minitab Software 9
A Effectiveness of Training... micro or macro? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 29
M Macro that will perform a normality test and capability analysis - Minitab help Using Minitab Software 1
M Where to find an acceptance sampling excel macro or .xls template? Inspection, Prints (Drawings), Testing, Sampling and Related Topics 6
M SPC Excel macro add-in - File Attached Excel .xls Spreadsheet Templates and Tools 23
L PC in patient environment - BF applied part that uses USB to connect to PC IEC 60601 - Medical Electrical Equipment Safety Standards Series 9
S How to connect NCMR, Deviations and Change Control ? Nonconformance and Corrective Action 2
S How much do trainers charge typically for an Adobe Connect / WebEx based training? Training - Internal, External, Online and Distance Learning 3
T Connect on LinkedIn with Company Recruiter Career and Occupation Discussions 7
Marc Google's Pacific fiber optic cable departs from Japan to connect to America After Work and Weekend Discussion Topics 1
X How to connect AQL to confidence level? AQL - Acceptable Quality Level 2
U Free - ELV 'Compliance Connect' Tool from AIAG IATF 16949 - Automotive Quality Systems Standard 3
J How to connect FMEA, Control Plan, G8d, 5Whys and Draw the pareto Nonconformance and Corrective Action 0
D Computer access, password control ISO 13485:2016 - Medical Device Quality Management Systems 6
J ISO 9001:2015 Clause 8.5.1 Control of Production and service provision - Help with Work Instruction Access ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 13
Q FMEA and Risk assessment in Microsoft Access FMEA and Control Plans 6
D Economic Operators, EU Market Access EU Medical Device Regulations 2
Richard Regalado Informational ISO makes available relevant BCMS standards free for online access Business Continuity & Resiliency Planning (BCRP) 6
I Master Document Access - ISO 9001:2015 clause 7.5.3 Document Control Systems, Procedures, Forms and Templates 5
F ISO Certified companies - Is there a list of certified companies that I can access ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 1
C Security and access in cGMP facilities Pharmaceuticals (21 CFR Part 210, 21 CFR Part 211 and related Regulations) 1
P Average access height into an industrial machine (average base plate height) Human Factors and Ergonomics in Engineering 2
K EU MDD Class I Device market access / certification after 26th May 2020 EU Medical Device Regulations 9
M Informational Paper on open access – EU postmarket surveillance plans for medical devices Medical Device and FDA Regulations and Standards News 1
R Demonstrate how sufficient levels of access to data is achieved - Claims of equivalence EU Medical Device Regulations 3
M Informational US FDA – Expanded Access for Medical Devices - Investigational medical devices Medical Device and FDA Regulations and Standards News 1
C Access to Technical Documentation - MDR Chapter VI Article 61 EU Medical Device Regulations 4

Similar threads

Top Bottom