Control SubFORM from mainFORM (1 Viewer)

N1ck9141

Registered User.
Local time
Today, 13:30
Joined
Aug 21, 2008
Messages
72
I have a "mainForm" which contains a "subForm" (container)
Can i create a button on the "mainForm" which will search for a record and find next record for which ever form i currently have in the "subForm (container)"

thank you
 

ted.martin

Registered User.
Local time
Today, 12:30
Joined
Sep 24, 2004
Messages
743
The answer will all be based around "Filtering". Insufficient information at this stage like has the subform loaded? If it has then maybe a simple DLOOKUP would suffice, it depends on how you want the result coming back to you. You could even open a new Pop-Up form based on the precise data in your subform to portray the results.

There will be many options, it all depends on what you want to do when you find the record.
 

N1ck9141

Registered User.
Local time
Today, 13:30
Joined
Aug 21, 2008
Messages
72
all i want to do is that find it, for example when u build the basic find record button and find next button it jst keeps doing down finding the word u typed in till it cant find it anymore in yr list...what i need is this, however i need to button on the main form instead of the subform
 

ajetrumpet

Banned
Local time
Today, 07:30
Joined
Jun 22, 2007
Messages
5,638
all i want to do is that find it, for example when u build the basic find record button and find next button it jst keeps doing down finding the word u typed in till it cant find it anymore in yr list...what i need is this, however i need to button on the main form instead of the subform
use a RECORDSETCLONE and the FINDNEXT command of the recordset object. like this:
Code:
dim rs as recordset
set rs = me.subformCONTAINER.form.recordsetclone

with rs
   .find "[field] = 'your criteria'"
end with
you might also look at FINDRECORD, FIND, SEEK, and DOCMD.GOTORECORD.
 

Users who are viewing this thread

Top Bottom