473,320 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How do you "look up" a value in an access subform?

Lets say I have a form called Planet_Systems and a form called
Species. I then want to link the primary key "Planet" to bring up
it's various species in the corresponding subform. So, I created a
subform species within the forum Planet_Systems. They're linked
properly and related etc.. I typed into the Planet combobox: "Earth".
I would now like for all of the different Species found on Earth to be
listed in the subform automatically once I click on a button in the
main form or something. I guess it's sort of a lookup or requery
function but I'm not too sure. Any experienced Acces users know what
I'm trying to do here?
Nov 12 '05 #1
2 5436
In your sci-fi example, there would be a many-to-many relationship between
Planets and Species, i.e.:
- one planet has many speicies, but also:
- one species can appear on many planets.

You need 3 tables to handle this relation:
- tblPlanet, with PlanetID primary key;
- tblSpecies, with SpeciesID primary key;
- tblPlanetSpecies: one record for each combination, with foreign keys
PlanetID and SpeciesID.

The subform would be bound to tblPlanetSpecies, with a combo box to select
the species.

For another example and more detail, see:
http://allenbrowne.com/casu-06.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Alienz" <ks*****@yahoo.com> wrote in message
news:58*************************@posting.google.co m...
Lets say I have a form called Planet_Systems and a form called
Species. I then want to link the primary key "Planet" to bring up
it's various species in the corresponding subform. So, I created a
subform species within the forum Planet_Systems. They're linked
properly and related etc.. I typed into the Planet combobox: "Earth".
I would now like for all of the different Species found on Earth to be
listed in the subform automatically once I click on a button in the
main form or something. I guess it's sort of a lookup or requery
function but I'm not too sure. Any experienced Acces users know what
I'm trying to do here?

Nov 12 '05 #2
Well I would like the subform to actually bring up its 1st entry based
on the primary key in the main form...and then to be able to scroll
through the subform values so its a bit different. Dont know what time
it is in Au. Thanks for your help and if you have any more suggestions
pls reply when you can! The way Im doing it now the subform values are
associated with the main form but I have to create a new entry and then
go back to view the associated subform entries. The subform is not
populated immediately once I enter a value into the main form primary
key. Im trying some things like maybe a call function but its not
working because the subform has several values and I guess I want it to
jump to the 1st.
I explained it a little more here:
http://groups.google.ca/groups?q=kst...8&selm=58e54da
4.0405192038.49aa1d72%40posting.google.com&rnum=2

But no one could answer that post :(
Btw, is it winter in Australia now.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

57
by: John Howard | last post by:
I've sent several messages over the last year asking about python - Who teaches python? Is python losing steam? etc. I have noticed, eg, the declinng number of books at my local borders. The last...
8
by: Bob Bonn | last post by:
Upon loading a page, I'd like a narrow image to rise up from the bottom of the screen, along the left-hand side, and then stop at a given point. I'd like to be able to choose the rate of ascent...
3
by: Robert Oschler | last post by:
I have an IFrame on my web pages that displays useful tips. I have a button next to it that hides and shows it by triggering a Javascript call. I know how to make the iframe invisible by changing...
3
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up...
3
by: Travis | last post by:
I am trying to prevent an exception from bubbling up from one nested Try/Catch Block to its "Parent" Try/Catch Block. Here is some example code: try{ try{ //Non-application killing code that...
1
by: Lars Netzel | last post by:
I'm pushing out a CD with updates for a number of users that do not have access to a broadband connection. They have a Modem connection and a standard Dial Up account that I have set up for all of...
0
by: AA Arens | last post by:
I made a find record button on my form "company" (with field for name, phone nr, e-mail etc.). I expect that when I focus on one of the field, the "look in" of the find-record dialog box should...
1
by: AA Arens | last post by:
I use the undermentioned code to find a record in a predefined "Look In" field: Private Sub Command137_Click() On Error GoTo Err_Find_Record_Click Me.CompanyName.SetFocus DoCmd.DoMenuItem...
2
by: puzzled | last post by:
I have "Find" buttons throughout my database, each with focus on a different field (they were created with the wizard, then the focus set to the corresponding field with VB). If i press a find button...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.