How-To: Hide Repeating Values in a continuous form ?!?

B

Bob

sounds simple enough; I just want to hide repeating values in a
continuous form ie:
I want:
1 john doe
1 mary jane
2 harry carry
to appear as:
1 john doe
mary jane
2 harry carry

I've tried everything I can think of, both in terms of programming,
and search terms.
oncurrent does NOT work anyway I've tried.
inserting an unbound, calculated field that calls a function to save
the last value does NOT work.
Using sub-forms is out of the question, because I want the continuous
form to scroll correctly.
I've tried iif's in various fields. Can't even remember all that I've
tried!!

how hard can this be?
Could someone point me in the right direction?
TIA - Bob
 
J

John W. Vinson

how hard can this be?

Pretty hard indeed.

It's very easy on a Report, but there's no built-in way to do so on a form.

One question: if this is an Autonumber value, or another arbitrary,
meaningless ID field, why display it AT ALL?

John W. Vinson [MVP]
 
B

Bob

Pretty hard indeed.

It's very easy on a Report, but there's no built-in way to do so on a form.

One question: if this is an Autonumber value, or another arbitrary,
meaningless ID field, why display it AT ALL?

John W. Vinson [MVP]


John,

TX much for your reply.

unfortunately, it is a needed number. A category ID is what the number
represents, and I wanted to be able to scroll this information on a
continuous form. It works nicely, except that I don't want to see the
ID repeating...

Are there any work-arounds, or other directions you can point me?
BTW - forgot to mention - using access 2k.

TX again IA...

Bob
 
B

Bob

Bob,

The only way I can think of is to use a Flex Grid control which can
group fields orhidedata in some fields, or whatever. Have a look at

http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='Flex...

for some examples.

Peter Hibbs.


Peter,

Appreciate your tip - looks like a lot of possibilities in that
example I DL'd... take me a little time to dig into.

I had actually tried doing something kinda similiar, in that I tried
to hide (not visible) the first field on my line,
if its value was the same as the previous value, stored with a
function. I tried using "OnCurrent" as my trigger.
Unfortunately, on-current doesn't seem to work right; I sortof knew
that, but I can't remember the other trigger that behaves similarly,
nor could I find it thru various searches.

If I could get this field to go not visible when I want, this would
seem the easiest solution with least hassle. And this seems like I
SHOULD be able to do it....

Any ideas about this?

TX again for that tip - there's clearly some really COOL stuff in
there, that will definitely go into future apps....

Bob
 
P

Peter Hibbs

Bob

The only way I can think of is to add a new field to your table, call
it NumberRef (or whatever) and use this field as the first field on
your Continuous form (i.e. the one that normally displays the number).
Then, when you open the form, write a bit of code to cycle through the
records that are about to be displayed (using a Recordset perhaps) and
if the number in the current record is different to the number in the
previous record then copy the value in your number field to the new
field and if it is the same as the previous record then set the new
field to Null. This assumes that your records are displayed in some
sort of specific order. This may slow down the display if you have a
lot of records to display (and I wonder if it is worth the effort) but
that is all I can think of. This is of the top of my head so I don't
know if it will work but it may give you some ideas.

Good luck.

Peter Hibbs.
 
B

Bob

Bob

The only way I can think of is to add a new field to your table, call
it NumberRef (or whatever) and use this field as the first field on
your Continuous form (i.e. the one that normally displays the number).
Then, when you open the form, write a bit of code to cycle through the
records that are about to be displayed (using a Recordset perhaps) and
if the number in the current record is different to the number in the
previous record then copy the value in your number field to the new
field and if it is the same as the previous record then set the new
field to Null. This assumes that your records are displayed in some
sort of specific order. This may slow down the display if you have a
lot of records to display (and I wonder if it is worth the effort) but
that is all I can think of. This is of the top of my head so I don't
know if it will work but it may give you some ideas.

Good luck.

Peter Hibbs.


Peter,

Again, TX for your suggestion.

I had tried to do exactly that, but I didn't use a recordset; I let
the form access the table.
I would have thought I could do it that way, but I can certainly see
I've got full control if I program the table access myself. This would
certainly do the trick. There number of records isn't that large,
shouldn't exceed 30 for any given continuous form.

Shouldn't be too much more work (than I've already done), so I may as
well give it a shot...
But if I can't get it to work, I guess I'll have to leave as-is, until
I can find the time to really go thru the flex-grid stuff...

TX...

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top