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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a 4th Level Subform Issues

Status
Not open for further replies.

Shairal

Technical User
Oct 13, 2005
25
US
I have a main Customer Information form, and within that form I have a Project subform for all the projects we're working on with that customer, and within the Project subform, I have a Parts subform where the user enters all the parts required of that particular project. I now want to be able to enter comments regarding each part in the Part subform – hence a Comment subform.

My first question is, in order to put a subform in my Parts subform; it requires me to change the type from Continuous Forms to Datasheet or Single Form, which means I lose all the 'pretty' formatting using the Datasheet or I only get one part listed using the Single Form. Is there away around this?

My second question is, I would like to make the Comment subform kind of a 'floating' subform – so when the user is in the part number field, the Comment form opens up enabling the user to enter a new or edit existing comments. I envision this subform kind of laying (floating) over some of the other part information, while entering comments, and then when the user moves to the next field the Comment form disappears.

This is how I envision it … but I have no idea how to accomplish it! I'm using Access 2003, and my knowledge of vb is somewhat limited. I have worked on it for daaaaays now, and my deadline is getting short … can anyone help?
 
Sounds like you do not want a 4th subform at all.

You simply want to open a new form.

I would do two things with it.

First I when opening it I would open it with specific data (by part), if you use a command button, the wizard should take care of this piece for you (advanced wizards have to be installed).

Secondly for the comments form, I would specify a default value for the part foreign key (say a hidden textbox) to be the part on the appropriate subform. That way if you add any new comments it will relate to the selected part.
 
The comment for the part is specific for that part, for a particular project. So a part could be used in several different projects for several customers, but the comment is unique to each customer/part. It seems that your suggestion would apply a comment based on a part, no matter where the part is used; maybe I'm misunderstanding your suggestion?
 
Whatever the primary key is of the subform that contains the part is what you want to use to duplicate as a foreign key in your comments table. I don't know what your table structure is. I am guessing from your comment that it is a composite key (multiple fields). I would highly suggest for simplicity sake you add an autonumber to that field and use it as the foreign key to the comments table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top