473,395 Members | 2,423 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,395 software developers and data experts.

How to navigate records without navigating subtable records

137 100+
Scenario:
I've got a table for adding records, with a subtable for all data requirements related to that record.

I've built a 'view' form to navigate through the records, so that you can view the details of each. This includes a listbox to display the list of data requirements attached to each record.

I've made navigation buttons using the control wizard and converted them to VBA to allow more flexibility so that I can add code to them.

Problem:

I want the form to navigate through the primary table records one by one, and just display the subtable records in the listbox. Currently it navigates through each individual subtable record in the listbox before moving on to the next primary record.

For example, say I have:

Record 1
- Data Requirement a
- Data Requirement b
Record 2
- Data Requirement c
- Data Requirement d
- Data Requirement e
Record 3
- Data Requirement f

When I navigate through the records, it goes:

Record 1a
Record 1b
Record 2c
Record 2d
Record 2e
Record 3f

But what I want it to do is navigate just the primary records, so that it goes:

Record 1
Record 2
Record 3

Even if I take the listbox out, the form is still navigating the sub records off screen, as it takes 2 clicks to get through the first primary record, then 3 clicks to get through the second primary record.

Is it possible to achieve what I desire?

Please let me know if I've missed any information.

Thanks.
Dec 14 '10 #1

✓ answered by mshmyob

If you change your "Record Source" for your form to just your table name it works.

cheers,

8 2682
mshmyob
904 Expert 512MB
Sounds like to me you created the navigation buttons in the subform and not the Main form.

Can you attach the database so we can look at it?

cheers,
Dec 14 '10 #2
Adam Tippelt
137 100+
Navigation buttons were created in the footer of the main form, not the subform.

I've now got the form/subform working so that the listbox itself isn't navigating through each sub-record, however it's still doing it invisibly in the background, as it still takes multiple clicks to get through each record. I've also noticed that if a primary record doesn't contain any sub-records, then the form won't even navigate to these primary records, and misses them out entirely.

I've attached the areas of the database concerning this issue. This is the first Access project I've done, so apologies if the code is a mess!

Let me know if you need me to explain anything.

Thanks.
Attached Files
File Type: zip Navigate Records Problem.zip (129.7 KB, 120 views)
Dec 15 '10 #3
mshmyob
904 Expert 512MB
Adam I didn't realise you were the same person who was having the problem with the delete key also until I saw both databases. I gave you the solution for the deletion in your other post but when I saw your form and table design I didn't say anything but now I think I should.

You are not really using subforms properly.

If you want I will help you with the table design as well as the form design to help with the problems you are having.

If you want help with the table design please tell me the relationship between the 2 tables supplied - testlibrary and datarequirements.

The way you have it set you are saying that:

Each TestLibrary can have many datarequirements
Each datarequirement has one testlibrary

This may be correct but I just want to make sure. I thought maybe requirements (datarequirements) could have the same requirement for many tests (testlibrary) but you say no and create new requirements (datarequirements) for each test (testlibrary)

Could you explain what the Data in the Datarequirements table and the testlibrary are.

cheers,
Dec 15 '10 #4
mshmyob
904 Expert 512MB
If you change your "Record Source" for your form to just your table name it works.

cheers,
Dec 16 '10 #5
Adam Tippelt
137 100+
Ah so obvious! Thank you!
Dec 17 '10 #6
Adam Tippelt
137 100+
To answer your other post:

Yes the relationship is supposed to be one to many, as each test may have multiple data requirements.
For example, the 'test' may be to test a drop down menu box. The data requirement would be to test every possible option within that drop down list, so that you test all the options and not just one.

Given the situation it's highly unlikely that the same data requirements would apply to more than one test. If this happens then yes under the current design the data requirement would be 'duplicated'.
I may improve this further down the line to offer an "Add new or use existing from drop down list" option for the data requirements, but for now the data requirements are always added new by the user.

Was this the only reason you thought that I was using subforms incorrectly?

Thanks.
Dec 17 '10 #7
mshmyob
904 Expert 512MB
OK then you have the correct relationship type.

Since you are just using a List box with it's own query in the subform you actually don't need the subform at all.

cheers,
Dec 17 '10 #8
Adam Tippelt
137 100+
No I didn't think I would, however it's in there because the page originally started out as a duplicate of another, and I've just not taken the subform out.

Thanks for all your help.



EDIT: Turns out I needed the subform for other functionality anyway.
Dec 20 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul Neave | last post by:
Yahoo! has launched a beta of it's new mapping application: http://maps.yahoo.com/beta/ It's based in Flash, but it uses JavaScript. I'm curious about one feature, though - when you pan about...
5
by: D. Dante Lorenso | last post by:
I have a simple table that I'd like to query to pull out a heirarchy from a tree relationship. What is the best way to do this without a 'CONNECT BY' clause like Oracle has? Example mytable...
3
by: jaYPee | last post by:
anyone know how can i get a 10% random records out of 2000 records? 2000 is only an example and it will vary anytime. i want to create a report out of this 10% thanks in advance
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
3
by: Martin Williams | last post by:
This is my first post to this group. I am currently working on a project for my Intermediate vb.net class. My project is a movie rental program, which involves displaying customer records with...
1
by: madhu | last post by:
Hello all, I am a bignner to vb.net I am not able to move the dataset and bind the textbox to dataset. My objective is 1) when the form loads it should display the first record. and the...
4
by: jkuruvil | last post by:
I need to print a report of a bunch of records that falls between certain dates. Some records have dates and some don't. I did a UNION query to look for everything that falls between these two dates...
0
by: Ohad Weiss | last post by:
Hi all, I've once asked about that topic. but didn't get an answer. I have a dataset based on 4 tables, which have relation between them. The main table presented to the user on textboxes...
4
by: abdul razak | last post by:
delete multiple records by checking checkboxes records from database use javascript
3
by: dcbtux | last post by:
how to show only 11 to 20 records out of 1000 records through jdbc
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.