Help writing an SQL query.

Hi all. I'm new to access and trying to write a contacts database for
a college project.

A contact can have many disciplines, and each discipline can have many
subdisciplines.  This means the contact can have many subdisciplines.

I have created a disicpline and subdicipline table, created a
realtionship between the 2.

I have a subform which allows the user to select the discipline and
subdiscipline from a table that links the two tables.

What I cannot do though is filter the subform so that when the user
selects a discipline, only the relevant subdisciplines are shown.

How can I do this?  I'm sure its very basic considering some of the
posts I've read through here, but I am new to this stuff so appreciate
the time you will be taking.

Thanks!

0
Mat
5/7/2007 3:57:51 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
579 Views

Similar Articles

[PageSpeed] 42

With the discipline in the main form, the sub-form based on the 
discipline-subdisciplines table, built a parent-child link. In fact, make a 
form with the subdisciplines first, call it subdis. Next, make a second form 
the main form, based on the disciplines table. Add the control that will get 
the discipline value. Next, with the Wizard active, insert a subform 
control, use the first form you created, and specify the 'discipline' value 
as the link between the main form and the sub-form. The design properties 
will then be set for you, by the wizard.

That is, indeed, a form design question, rather than a query question :-)



Hoping it may help,
Vanderghast, Access MVP


"Mat J-Ho" <matjarvishorsman@gmail.com> wrote in message 
news:1178553471.591300.211680@e65g2000hsc.googlegroups.com...
> Hi all. I'm new to access and trying to write a contacts database for
> a college project.
>
> A contact can have many disciplines, and each discipline can have many
> subdisciplines.  This means the contact can have many subdisciplines.
>
> I have created a disicpline and subdicipline table, created a
> realtionship between the 2.
>
> I have a subform which allows the user to select the discipline and
> subdiscipline from a table that links the two tables.
>
> What I cannot do though is filter the subform so that when the user
> selects a discipline, only the relevant subdisciplines are shown.
>
> How can I do this?  I'm sure its very basic considering some of the
> posts I've read through here, but I am new to this stuff so appreciate
> the time you will be taking.
>
> Thanks!
> 


0
Michel
5/7/2007 7:04:08 PM
Reply:

Similar Artilces:

Help with formula #18
Hi All: I am WAY over my head here, and you all have always been great help, so hopefully someone can help with this. I had someone write this for me to use as an index at the top of a spread sheet. It works beautifully . The problem is I would like to move this index to sheet 2 of the same spreadsheet and when I copy and paste it, it does'nt work. Is there anyone who can modify this to work as an index in sheet 2 and will search sheet 1 for the results? TIA Keith =IF(#REF!="","",IF(ISNA(MATCH(#REF!,$H$31:$H$65536,0)),"",HYPERLINK("#"&C...

Help needed with Money 2003 files
Hi there, I've been using money 2003 for years even when upgrading to new PC's as I had the original disk. I've just had to rebuild my hard drive and now cannot find the disk anywhere so cannot install Money. As you cannot now buy Money, I've tried downloading the trial version of Money so that I can access all the account details/balances but it says that they're not compatible with earlier versions of money. Is there anything that I can do to get these files open or have I lost all my records for the last 6 years? I'd really appreciate your assistance. Jayne EggHead...

How do you combine two columns to one? Help!!!!!!
I have address numbers in column A and street names in column B, I want to combine all of both columns into one without going through the whole process for each individual cells. HELP!!!!!! "sttrumpet" <sttrumpet@discussions.microsoft.com> wrote in message news:F72E43CE-CA99-4CD0-BCA1-85EFADCB459D@microsoft.com... > I have address numbers in column A and street names in column B, I want to > combine all of both columns into one without going through the whole process > for each individual cells. HELP!!!!!! Use the fuction =A1&B1 in cell B1 Drag the function ...

VB Code help
Here is a portion of one of my VB Macros in Excel: If Selection.Count > 0 Then MsgBox ("Average = ") & (RunningTotal / Selection.Count), vbInformation, "Average" End If My question: How do I format the number (RunningTotal/Selection.Count) to look like 0.000, instead of 0.0000000000000000?? What should my code look like with the new formatting. Thanks Chris Chris, Try this: ....Format((RunningTotal / Selection.Count), "0.000")... -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- &qu...

MSFlexGrig and SQL Query
How can i load dates in a MSFlexGrid Object whit a SQL Query???? ...

Would slow links cause write latency on DB?
We have 3 RAID 10 volumes, with various DB's. We have one database that is just for remote users. They have slow links and I was wonder if these would cause phyical disk write and read delays for that DB only, as it seems this DB is higher than the others. Thanks It would seem unlikely but exactly what counters are you measuring? Exchange commits transactions to memory and logs files first. Nue "SW" <SW@discussions.microsoft.com> wrote in message news:7A0DCFDE-B5DF-4229-87C6-9659A9BBA470@microsoft.com... > We have 3 RAID 10 volumes, with various DB's. We h...

Optimizer on SQL 2005
I ran dbcc updateusage ('demodb'). I than ran dbcc show_statistics ('location', 'ix_phone'). The update date (statistics update date) remained old. Why? Why weren't statistics updated? BTW.. I have auto update statistics set to on. Thanks in advance DBCC UPDATEUSAGE doesn't update statistics. It only updates the info SQL Server keeps about number of rows, pages and such. To update statistics you use the UPDATE STATISTICS command. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blog...

Need help with using a bar graph in a report
I have a report that separates information about representatives by manager. I need the graphs to give a quick summary on a few stats from each rep but only show for that manager's team and not all information. For example: Manager A has RepA, RepB, and RepC under him. Each rep has Aux1, Aux2, Aux3 information which needs to be displayed. My goal is to show Manager A with his Reps A,B, and C of their Aux1, 2, and 3. Then, under the next manager Header I want Manager B to show Rep D, E, and F with their Aux1, 2, and 3 information. Etc thru Manager G. Please help... Th...

how to put in sql code
first of all many thanks to Klatuu who has already helped me a lot!! I create my SQl code by means of some string concatenation. I do this so i can use the values of my field to create my SQl code. The problem is that some of these fields are double-populated eg. field location contains England and Brazil. My string creates "IIf([Table]![Location]" & [Location] & ",'OK', 'problem')" how can i populated the field location so that it is SQl-code? as =(Brazil or England) does not work as =Brazil or = England do...

Help with Userform
I need to setup a restricted means of allowing users to edit data in existing cells on a spreadsheet through a macro (userform?). I want to create a userform that will read data from these existing cells and display their contents in a series of text boxes. The user will then have the choice to edit any data item, if they need to, or leave the data as is. Upon the user hitting the OK key on the userform, the edited data will be entered in their previous cell locations. Any help or examples will be appreciated! Thanks ...

Parameter Query using date ranges
I am creating a parameter query where I want to pull data between 2 dates. In the date criteria of my query, if I write between #01/01/2008# and #01/31/2008# +1, I will get all data for January. If I use a form to enter the dates and have Between [Forms]![autoexec]![start] And [Forms]![autoexec]![end] +1 in the date criteria, I get an error. Does anyone know what I should put in the criteria to make the query work? Are you entering your dates as m/d/y? What happens if you try: DateAdd("d", 1, [Forms]![autoexec]![end]) Is the form open? -- Duane Hookom Microsoft Access...

CRM SQL Database size, scaling and archiving
Our company is considering Dynamics CRM. Us poor IT guys have to make sure it keeps running for years to come. And we lack the experience, including bigger SQL implementations. I'm concerned about 3 things. They might be dumb questions, but I'm asking anyway. What's the maximum database size in terms of relations/contacts ? At what stage does SQL grind to a halt. Are we talking 100.000 contacts ? Or 1.000.000 ? or 10.000.000 ? Can I seperate the different datasets (email-history, cases, documents etc) across seperate SQL databases or even servers ? For instance, if someone ...

&quot;New Web Query&quot; function
good day, are there any friends use New Web Query fuction under Data -> impor external data? My objective is to export (a list of stocks info) from web page t Excel spread sheet. e.g. the is is Microsoft's stock details (stock code: MSFT) http://finance.yahoo.com/q/ae?s=MSFT i can use "New Web Query" function to link this page to spread sheet. Question: how can I define a list of stocks (let say 10 differen stocks) that I want to monitor apart from creating 10 differen separate spreadsheets link with each individual stock code? any ideas are welcome thanks for your help ...

amend a PO with a query? Please help!
Hello, Our new warehouse manager entered, received and committed a PO from the wrong vendor - over 100 items! Does anyone know a way to either reverse the PO or change the vendor? Please help!!!! Thank you! diana Diana, You can reverse the PO by opening it again in receiving mode. Use the Quick Scan button and add an item to the PO (any item). This will 'unlock' or re-open the PO. You can now delete the item you just added back off. Next you would enter the quantity 'Received to Date' of each item into the 'Quantity Received' column as a negative. Fo...

Please Help...I can not send/receive or delete email on outlook 2000
It gives an the following errors" Error has been detected in the file C:|Windoews\Outlook.pst. quit all mail applications and then use Inbox Repair tool." I spent hours tring to find a solution on the support section. Couldn't find it.. Thank you so much for help.. What size is yr *.pst? OL prior to 2003 can have problems when greater than 1.7gb The inbox repair tool is scanpst.exe If oversize; http://support.microsoft.com/?kbid=296088 David "Daniel" <dqiab@yahoo.com> wrote in message news:05a401c3676d$0ef74c50$a401280a@phx.gbl... > It gives an the follow...

Need help with setting IFrame script
I got the perhaps overly ambitious idea of customizing the Account screen to load the map and directions from our office to the customer site. I am using the DirectionsFind url, though I may switch to MapQuest if I can find the parameter list. Which I use, however, is a moot point if I can't figure out how to make it work in an IFrame. I have written and debugged the JavaScript that concatenates the http command for generating the map and directions from one point to the next. I know the command works because I've pasted the results into my browser and it brings up the corre...

help, derag won't work and the outlook folder shows 36000 fragmnets
defragmented and the program works fine but when it finishes it looks the same on the as the original analysis. Then I look at the report and it list a lot of files that can't be drfragmented. The only thing I can think of is that this pc was once on MSexchange (the reason I mention it is that the outlook pst which is 1.8 gigs, shows 36000 fragments and it is located in the c/exchange folder) Anyway, what do I do??? how can I get the drive to defrag? Hello Bob When you open IE\Properties\Programs what do you see in there under E-Mail box. Use the dropdown arrow and take a peek on ...

SQL Server (XML Data) Through ODBC to MS Access
Hello, In one database in my company. Previously the data in SQL Server, the tables were simple text and number formats and it was easy for me to link the data through ODBC to MS Access and I could do all sorts of queries and calculations, etc. But, now (after several months) I realize that the DBA and Programmer changed, the data in SQL Server to be XML Data Type in the new setup. In SQL Server. dbo.FlightDocuments Table docID, int docInfo, xml docLogs, xml and so on. and I see the data in Access (through ODBC) for one of the fields of the above table like this: ...

Using SQL Query to mass update a field.
Having a problem in eOrder where the pictures are not showing up. I found out the Inventory image in internet information is mapped to a drive letter. If I remove the drive letter, I can see the picture in eOrder. I would like to mass update the SY01200 INET4 field and change all from f:\inventory pictures\image.jpg to image.jpg (where image.jpg is the file name). It sounds like I need to create a cursor script but am not sure how to do this. Can anyone help me with this? Thanks. Backup you data first. You might be able to use DTS to trim the data with a string transformation. Or you ...

Please help
Only one of my users (who us utilizing IE8) is getting the following error when creating a new Timesheet in PWA 'g_oMainForm_name' is null or not an object mytssummary.aspx Code: 0 URI:http://[project server]/mytssummary.aspx Many other folks are using Timesheets - some with IE8 - and it works fine. This is the only user so far who has reported this. Any help would be greatly appreciated. Thanks! Andy Novak UNT Hi Andy, Maybe this will help: http://allfaq.org/forums/t/136987.aspx "anovak@unt.edu" wrote: > Only one of my users (who us...

Help in macro in excel.
Hi all. I want to write a macro in an excel sheet wherein I want to copy a few cells from my source worksheet and paste their hyperlink to another worksheet. Also, the destination worksheet's cell number where this is pasted is not fixed. How do I accomplish this? Please help urgently. Thanks. SPG, Running the macro recorder whilst inserting a hyperlink yields this code: ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ "Sheet1!A1", TextToDisplay:="""go to hell""" Now just substitute the relevant stuff into e...

HELP PLEASE!!! #2
This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C5D651.83566720 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0019_01C5D651.83566720" ------=_NextPart_001_0019_01C5D651.83566720 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable how do i get this background off this?? im very new... thanks.... =20 ------=_NextPart_001_0019_01C5D651.83566720 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-/...

Help creating a list
Hi, I have a list of values in a single column. Many of the values are repeated. I need to create a list from this, where each value only appears one time, and capture in a new tab. Example Tab 1: 2008 Record A 2008 Record A 2009 Record B 2010 Record B 2010 Record B Result Needed in Tab 2: 2008 Record A 2009 Record B 2010 Record B Appreciate any help....Thanks ...

SQL 12-29-03
Why does Small Business Server say it doenst support SQL when trying to load it? ...

my excel does not work properly, please help !!
hi there, i got all the Microsoft office programs on my laptop. Excel use to work perfectly, till last week or so. when i open it or open an excel program; it opens as if its " INTALLING " excel. it gathers information to install it then it says File could not be found on C:\Program Files\ then it asks me to BROWSE to look for the file. please help me, i need excel to work very soon. aa p.s. i had the office CD back home .. im in another country for couple of months. and you know how much it costs to buy a new 1. help me .... ...