Thank you in advance for all your assistance, it is GREATLY appreciated. I'm
writing a small Access 2000 program for tracking Kennel Litters for a friend
and I'm wondering how I can loop through all records from a Parent form to the
Child form with a matching Parent Child relationship.
What I'm trying to do is make it where she can check a box or hit a command
button, loop through all the child records with the same ParentID as the
foreign ChildID and update Date, Procedure and other various information.
Example: Shot for one dog, will be same for all the dogs in that litter.
Instead of having to enter each shot individually, a checkbox or command button
could be used to enter all similar shots/procedures for the complete litter?
Michael 3 2757
Lumpierbritches wrote: Thank you in advance for all your assistance, it is GREATLY appreciated. I'm writing a small Access 2000 program for tracking Kennel Litters for a friend and I'm wondering how I can loop through all records from a Parent form to the Child form with a matching Parent Child relationship.
What I'm trying to do is make it where she can check a box or hit a command button, loop through all the child records with the same ParentID as the foreign ChildID and update Date, Procedure and other various information.
Example: Shot for one dog, will be same for all the dogs in that litter. Instead of having to enter each shot individually, a checkbox or command button could be used to enter all similar shots/procedures for the complete litter?
Michael
For 'loop through all records' which is a procedural expression,
relational databases use update statements (queries, in Access).
You can create a query that updates a field in every record conforming
to certain criteria. I don't know what a litter is, but if you have an
expression for one litter, you can put that in the criteria row with the
update query.
Play with it, maybe you get the hang of it.
--
Bas Cost Budde http://www.heuveltop.org/BasCB
but the domain is nl
Lumpierbritches wrote: Thank you in advance for all your assistance, it is GREATLY appreciated. I'm writing a small Access 2000 program for tracking Kennel Litters for a friend and I'm wondering how I can loop through all records from a Parent form to the Child form with a matching Parent Child relationship.
What I'm trying to do is make it where she can check a box or hit a command button, loop through all the child records with the same ParentID as the foreign ChildID and update Date, Procedure and other various information.
Example: Shot for one dog, will be same for all the dogs in that litter. Instead of having to enter each shot individually, a checkbox or command button could be used to enter all similar shots/procedures for the complete litter?
Michael
Dim db as database
Dim SQLString as string
Set db=CurrentDB
SQLString = "UPDATE ChildRecord SET ChildRecord.ShotDate = #" &
Me!DateOfShot & #"
SQLString = SQLString & " WHERE ChildRecord.ParentID= " & Me!ParentID & ";"
DB.Execute SQLString
This is air code.
Ron
--
Ronald W. Roberts
Roberts Communication rw*******************@robcom.com
To reply remove "_at_robcom_dot_com"
Will you always perform the same procedure on all members of the litter? For
some procedures I would agree but for others it may be just a few of the
litter.
I would suggest an approach that would allow you to update one, more than one
or all child records with the same procedures by selecting child records. You
could provide the means to select all records by using a command button for the
list of child records or select each record that needs to be updated. Then
process only the records that were "selected" for processing.
Bill This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lumpierbritches |
last post by:
Thank you in advance for all your assistance, it is GREATLY appreciated. I'm
writing a small Access 2000 program for tracking Kennel Litters for a friend
and I'm wondering how I can loop through...
|
by: JJ |
last post by:
Hi All,
I am trying to Add nodes in code behind and am having
problems with the parent child relationships. I get a Use
of unassigned local variable error . I have the local
variables defined...
|
by: Darryn Ross |
last post by:
Hi,
How do i get my datagrid to display the contents of two related tables setup
in my access database, so i can see the plus/minus sign to expand retract
the Child details?
Regards
Darryn
|
by: Danny Tuppeny |
last post by:
Hi all,
I've been trying to write some classes, so when I have a parent-child
relationship, such as with Folders in my application, I don't have to
remember to add a parent reference, as well as...
|
by: Mr Newbie |
last post by:
Sorry to bother you guys but I have another questions related to DataSets.
I'm almost there now, so I dont expect to bug you much more ( Hopefully ).
I have Master / Details tables with...
|
by: mkidd |
last post by:
Hi,
I'm new at vb .net and I have an issue that must be a common one, but I
haven't found an example of it yet.
I want to create parent-child relationships for 3 tables...
|
by: Mr Newbie |
last post by:
Sorry to bother you guys but I have another questions related to DataSets.
I'm almost there now, so I dont expect to bug you much more ( Hopefully ).
I have Master / Details tables with...
|
by: RobKinney1 |
last post by:
Hello, Thank you for reading this post.
Please forgive my ignorance. This may be a simple question but am having
trouble finding a straight answer.
I need pass data from my Child Window back...
|
by: reachsamdurai |
last post by:
Is it possible to determine the list of child/parent tables for a
particular table from any system catalog tables? Using the
syscat.tables I'm able to retrieve the no of dependent parent/child...
|
by: Rick |
last post by:
VS 2005
I' m setting up a parent/child datagridviews in a form.
I am doing a lot of this by hand coding in order to get the feel of things.
I want a change in the parent table to trigger a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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...
| |