find/replace

  • Thread starter Thread starter chriske911
  • Start date Start date
C

chriske911

when a user searched for a value with find/replace from a form he got the
message the value could not be found
but when I looked for it in the table it was there
can it be that a value is searched only inside the subform's data and not in
the entire dataset ?

thnx
 
I was already affraid of this thus the obvious question would be how to
circumvent this ?

Well, what does it MEAN to search in a Subform? A subform shows the
records associated with the currently selected record on the mainform.
Would you want to find a record in the Subform's recordsource and have
the mainform switch to a record associated with the found record? What
if it's a many to many situation and there are dozens of mainform
records all associated with the found record - which do you want to
see? Would you want the found record to create a new record associated
with the currently selected mainform record, or to lose its current
association and become assoicated with the current mainform record
instead?

Just in terms of logic, it's not at all obvious what "searching a
subform" SHOULD do, and it may well vary from application to
application!
 
I'd like to go to the first record wich holds this value and go on to the
next as needed
something like searching a value in a textfile

the main form is a container for several similar objects and indeed it's a
possibility for one value to appear several times in the entire table but
only once for one container

it'll propably come down to a filtering so only the containers appear
wherein this value is found

thnx
 
I'd like to go to the first record wich holds this value and go on to the
next as needed
something like searching a value in a textfile

the main form is a container for several similar objects and indeed it's a
possibility for one value to appear several times in the entire table but
only once for one container

it'll propably come down to a filtering so only the containers appear
wherein this value is found

You'ld need a bit of VBA code using a Query linking the main form's
recordsource table to the subform's recordsource. The code would open
this query as a Recordset, use FindFirst to find the value in the
subtable field, and set the parent form to the first record with the
ID. The code would depend on the structure of your tables and forms,
so I hesitate a bit to post it here!
 
Back
Top