Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Need Help with a Sub Form of a Sub Form - :)

Need Help with a Sub Form of a Sub Form - :)

Need Help with a Sub Form of a Sub Form - :)

I have a main form with a subform inside it - that works great... HOWEVER, I want to click on a command button and call up a sub/sub form....

I have a main orders database, with a one-many relationship to a sub-orders databse.

That suborders database also needs to have several databases connected to it.

The Main database (tblOrderLog) contains the main info on the order. The Sub Job database (tblSubJobs) contains the breakdonw of all the individual jobs for that main job. All that works great setting up a sub form within the orders.

I want to insert a comand button on the SubJobs form that opens the "Engineering Notes" form (tblEngNotes) for that specific subjob... When I create a command button via Access 97 it only opens the first Engineering notes with int he entire database and not the one that coorelates to the specific subjob number.

Hope you understand.. I have several sub/sub databases that need to attached that away.


RE: Need Help with a Sub Form of a Sub Form - :)

I don't know if I understand 100%...Is your "SubSub" a true sub to the sub to the Main or is it a form you want to pop up when needed? If latter:
DoCmd.OpenForm "frmSUBSUB", , , "[YourCoRelatingNumber] = " & Me.YourCorelatingNumber . Please clarify your use of the word "database" versus tables within a database. Gord

RE: Need Help with a Sub Form of a Sub Form - :)


Sorry for the confusin:

I have one Database with three tables in it. Here is the structure:


I already created a Form that has this makeup:

|  tblOrderLog Form (MainForm)  |
|  tblSubOrder (SubForm)            |

Within that SubForm that is tied to the tblSubJobs I want a button that will "pop-up" another form that is tied to the tblEngNotes. That away a designer can enter in a multitude of notes about the SubJob....

Does that help ????


RE: Need Help with a Sub Form of a Sub Form - :)

If your command button is on the main its on click event would be:
    DoCmd.OpenForm "frmSUBSUB",,,"[YourCoRelatingNumber] = [Forms]![MainFormsName]![SubFormsNameAsSeenByTheMainForm].[Form]![YourCorelatingNumbersFieldName]"

If the command button is on the subform then as previous.
Make sure to set your "SubSub's" corelating number field's default value to = [Forms]![MainFormsName]![SubFormsNameAsSeenByTheMainForm].[Form]![YourCorelatingNumbersFieldName] if you're using this for data entry. Gord

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close