open bounds of form subform control

udik

New member
Local time
Today, 15:23
Joined
Jan 12, 2009
Messages
4
I open the form working_order and the subform winding_data with bounds of parent (main form) control - Power and child control (subform) - Power.
So they have the same value.

I would like to opet the bounds and to have all the records of the subfourm.

How can I do this?
 
If you are requesting what I think you are requesting ...

Look into the properties of the subform. There will be a link Master and Child fields. Just delete the field names out and your subforms will no longer be bound to the main form.

-dK
 
that will do the job if I will change it before I will open the form.
I want to change the subform after I opened it.

First I open it bound and use the subform records.
Sometimes as a seconed step I want it unbound and to be able to see and to use all recordset.
 
I think I understand what you are trying to achieve. You want a form basically which has a subform which can display both all the data related to a field, then a narrower select of records based on another criteria.
Therefore I would suggest two sub forms, one which displays all records and the other which is linked to main form and only shows those records you wish to view.
Alternatively you could have a onclick event which opens a fresh form to display only specific records. Please let me know if I have understood you correctly?
 
I think that is what he wants, but there is a much simpler way.

Let's say you create two buttons on the main form. Let's call one "cmdShowAll" and the other "cmdShowLinked". In the OnClick event use ...

Code:
Private Sub cmdShowAll_Click()
   Me!frmSubformName.LinkChildFields = ""
   Me!frmSubformName.LinkMasterFields = ""
End Sub

Code:
Private Sub cmdShowLinked_Click()
   Me!frmSubformName.LinkChildFields = "ChildID"
   Me!frmSubformName.LinkMasterFields = "MainID"
End Sub

Change the frmSubformName to the appropriate name of your subform. To limit the possible error, check the properties of the subform and copy and paste the "ChildID" and "MainID" as appropriate. You should see now that clicking one button will show all of the (sub)records and the other will limit the records to the linked properties.

Good luck!
-dK
 
Sorry

I tried DK solution and I got an error:
The table can't be programmed since it already open exclusively by other interface.

:confused:
 
You could try creating a new db and importing all the tables, forms etc.
 
it will be the same with new DB.
I think I need other solution.
 
Sorry

I tried DK solution and I got an error:
The table can't be programmed since it already open exclusively by other interface.

:confused:

I am not sure why that is. Is there more than one user? Is it a split database?

The only other option that I can think of is Tanya's post to have two subforms and then just toggle the visibility of each form.

-dK
 

Users who are viewing this thread

Back
Top Bottom