Subform control

Peter Bellamy

Registered User.
Local time
Today, 21:32
Joined
Dec 3, 2005
Messages
295
This is complex to describe, please bear with me.

A record has a form and this has a subform.
The subform can have several records.
The subform has a button that opens one of two another forms dependant upon the value of a control on the subform.
However as there can be several subform records it is possible to have both the control values, so both forms could be opened.

I want to give the user the choice of which subsubform to open.

I need a easy way of:
1. Checking all the recorded values of the subform control to check if a subsub form is to be opened.
2. If both the possible matches exist provide the user with the choice of which form to open.

The subsub form is just a another form linked by the subform control, it is not wizard generated subform.

Cheers
 
Sounds like you need to count records that satisfy certain criteria. If that is the case, check out the DCount() function.
For other databases or support inside a transaction, you might need to open a recordset with SQL like
Code:
"SELECT COUNT(*) As YourCount FROM SomeDomain WHERE SomeRecords = YourCriteria"
 
I consider that but it does not give the detail in the fields I need to choose the form.
A liitle more explanation might help you.
The form is a consignment record
The subform is a list of items in that consigment
The subsubforms are two test result record forms, for just certain items.

I use Count to determine if the button on the form becomes visible, no need for it for all other items.
I then need to know the detail of the record to determine which one, or maybe both subsubforms to open.

I am thinking of generating on the button click, a table of the records that match the subsubform crtiteria and then testing that to determine which s's'form to open.

I can use then Count to determine which s's'form.

That is the best I can think of!

pnb
 

Users who are viewing this thread

Back
Top Bottom