vba - How to simulate a Group Header in an Access Continuous Form? -


I have access to display in constant view ( not is a report) that contains a lot of repeaters Data means this:

state names Abe - FL Bart -> FL Deleanor GA / code> Mary

It must be interactive (form row header with each line Switch to some command buttons), but there is no way to have lots of data repeating add a group header by what state? That is how it looks:

state name> Florida Abe
Bart
Charlie
GA
< Code> Deleanor
Mary

The closest I can find is to add a field to the record source of your form, which is the number of each row within a group. After that you can add a text box as your control source in the expansion section of your form in the form of this expression.

= IIf (rank = 1, [state], ""]

The text box will display the first event of each state and otherwise a zero length string will be displayed.

I have tested with this query for the record source.

  SELECT m1.state, m 1.Name, (select number of meters as MyTable AM ​​(name) M2 WHERE m2.state = m1.state and m2.names & lt; = m1.names) Ranked as myTable m1 by ORDER m1.state, m1.names;  

And it works, but not editable If you need to be able to edit, use a query that uses DCount to generate a rank.

  SELECT M1.state, m1.names , DCount ("name", "miteabel", "state = '' & amp; state & amp;; & amp; & amp; & amp; & amp; & nbsp; & lt; = '" & amp; name & quot; & quot; ;) My amount from MA1 ORDER by m1.state, m1.names;  

Both of these results take your results:

  state Name Rank FAB 1 FL Bart 2 FL Charlie 3 GA Delanore 1 GA Mary 2 < / Code> 

Note, I took the unique combination of state and name


Comments