Computer Engineers

 
Home | Computer engineering other top | Fiber / Wireless / Copper Tran | Programming language engineeri | Semiconductor engineering
  Position:Home>Programming language engineeri>Article Content
Open query using parameters in MS Access
Source:Internet Author:Unknow Pubdate:2010-02-21  
cmlr (Industrial) 9 Feb 09 18:21
Hi all,

I'm a Control Systems Engineer with not much experience in database programming, but I am trying to create an application using MS Access. I realize I may make a fool of myself asking this question, but I'll just have to risk it.

My database has several tables. The first table contains the panel numbers:

ID | Panel number |  Description
-------------------------------------
1  |    P-001      |  Control panel
2  |    P-002      |  Network panel
3  |    P-003       |  Remote I/O panel


The second table contains an overview of materials:

ID | Description
------------------------
1  | Enclosure

字串3


2  | Terminals block
3  | Cable gland


In a third table I keep track of the amount of materials per panel:

ID | Panel ID  |  Material ID  |  Qty
----------------------------------------
1  |     1     |       1       |   1
2  |     1     |       2       |   40
3  |     1     |       3       |   6
4  |     2     |       1       |   1 字串9
5  |     2     |       3       |   7
6  |     3     |       1       |   1
7  |     3     |       2       |   25


I have created a form to show the panel list (i.e. the first table), and want to add a button to this form that will show the materials in the selected panel.
I have already created a query that shows the panel name, material description and quantity for all panels, but I want the query to only show the data of the currently selected table. I know I can open the query with a parameter, but would like to know how I can automatically use the "panel ID" as the parameter?

字串4



Thanks for your help.
Caspar

IRstuff (Aerospace) 9 Feb 09 22:11
I suggest that you RF this and post in www.Tek-Tips.com.  They have 7 Access-related forums. TTFN

FAQ731-376: Eng-Tips.com Forum Policies

(Click:
Previous:SCADA Radio 300 - 360 MHz   Next:freescale mpc565 processor
[Add TO Favorites] [TOP] [PRINT] [CLOCE WINDOWS]  
  Hot Article
·Visual Basic Serial Comms To S
·SIEMENS: I/O, NCDDE AND DCTL
·argc argv in winmain
·PIC code for triac light dimme
·MatLab pdepe solver
·Siemens s7-200 PLC & Visua
·24CXX Serial EEPROM programmin
·XML Files and Terramodel
·Connecting a Footswitch to an
·TETRIS source code is availabl
·LINKING MSC PATRAN WITH INTRAN
·DDE and SQL server
  Related Articles
·freescale mpc565 processor
·Where Can I Sell my Engineerin
·Programing with Conisio
·MS Sharepoint HELP!
·failing compaction efforts in
·Grading Legend Symbols?
·Liebherr excavator line art
·Build a road in the narrow sit
·Gunite/Shot-Crete?
·Excavation by grab
·Shopping for Software
·Where to get a quick/cheap tra
Cheap LouisVuitton Bags Civil / Environmental Engineers Structural Engineers Aeronautic Engineers Automotive Engineers Chemical Engineers Geotechnical Engineers Industrial / Manufacturing Engineers Materials Engineers Computer Engineers Agricultural Engineers Mechanical Engineers Petroleum Engineers Bioengineers Military Engineers