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

Tab / Form / SubForm / SubDatasheet

Status
Not open for further replies.

mtompkins

IS-IT--Management
Jan 14, 2003
166
US
This is less complicated then it appears - a question of if it can be done relatively easily.

The form is basically ...
Tab control with a Form
On that From a subform

Form is linked to table
subform is linked to subtable

RoastID is the common link to create the subdatasheet

All works fine.

On this subform - I'd like to use 3 combo boxes instead of using the datasheet view.

So in principal with three combox boxes there would be 3 individual entries on to the subtable. It would do wonders to keep the form easily used by the end user. It would also limit the amount of subdatasheet entries to 3 (which is appropriate in my use).

Any thoughts on making this happen would be greatly apprecaited.

 
Subforms are added in DataSheet view by default. However, you can change this. In the subform's Property sheet, change it's default view to Continuous Forms, then simply add your combo's as required! With a little judicious formatting, you can have the "look" of a datasheet with the functionality of the combos!

Hope this helps!
 
My question is similar but still different...I need have a form -> Tab control -> subform -> two sub_subforms. FORM are projects. SubForm are the versions of a project. Sub_sub1 is a list of accounting line items associated with the project. Sub_sub2 is a "cost type" (original estimate, revised estimate, actual) and amount for each line item (for reporting purposes).

The Line Items are in datasheet view. When I select a row in the sub_sub1, I need sub_sub2 (cost type and amount) to refresh to show related records.

From sub_sub1 "OnCurrent" event, I've tried
Dim qstring As String
Dim li_value As Integer
If Not IsNull(Me.li_id) Then
li_value = Me.li_id
qstring = "SELECT [fields needed] FROM
where li_id = " & li_value
Forms!set_up_projects!tbl_project_versions_subform!sub_line_item_costs.RecordSource = qstring

End If

I get a "object doesn't support this property or method" error (438).

any help would be GREATLY appreciated.
 
And this ?
Forms!set_up_projects!tbl_project_versions_subform.Form!sub_line_item_costs.Form.RecordSource = qstring

Have a look here:

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the link - I'm reviewing it.

What that last line was supposed to do was reset the recordsource for sub_sub2, so that it retrieves records only associated with the selected line item.

I've used that format to "Requery" one subform from another, but it was still relying on the parent subform for project version, not a same-level nested sub_subform.

 
Ahh light dawns! you can also use the Parent Property in the Event Procedure of sub_sub1

Parent!sub2.Form.RecordSource = "Select ..."

Where sub2 is the ControlName of the other SubForm (Not necessarily the subform's name).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top