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.
If you change your "Record Source" for your form to just your table name it works.
cheers,
8 2682
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,
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.
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,
If you change your "Record Source" for your form to just your table name it works.
cheers,
Ah so obvious! Thank you!
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.
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,
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: abdul razak |
last post by:
delete multiple records by checking checkboxes records from database use javascript
|
by: dcbtux |
last post by:
how to show only 11 to 20 records out of 1000 records through jdbc
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
| |