Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default values in fields

Status
Not open for further replies.

Borian

Technical User
Jan 16, 2004
17
US
Here's my scenario, I hope someone has figured out how to do this.

Have a form with 2 subforms
These forms built off a querry pulling in three tables
Tables:
Parent Table - Unit Information
- Primary Key is UnitNumber (Text Field)
Child Table - Service Orders
- Primary Key is ServiceOrderID (AutoNumber)
- Tied to parent with UnitNumber
GrandChild Table - Parts
- Primary Key is PartID (AutoNumber)
- Tied to Child Table with ServiceOrderID
- Has UnitNumber field to tie it back to
Parent.
Problem:
Want the to have UnitNumber in Parts subform to be defaulted to UnitNumber in Parent Table. Currently I am defaulting the ServiceOrderID from Child to GrandChild but I would really like to see the UnitNumber put in as well.

Thanks for any sudgestions

Paul
 
I recommend autonumbers for uniqueness but not for partnumbers or the like. You will invariablely want to change it. Use the main form as the parent and open a new details form with a command button. Tie the g'kids to the new form as a subform. You can put the parents unit number or any other number on the child form at the command button. Tie the kids to the parent with the proper data source in the kid's form and the g'kids through the subform.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top