Button Display/Focus for a continuous form (1 Viewer)

nstratton

Registered User
Joined
Aug 30, 2015
Messages
85
I am curious how focus is set during a continuous form. I have a continuous form that displays the information from a user selection. The user has the option to not select any information, thus the creation of the continuous form.

I have a few hidden fields on my form and based on the value in those fields I want to display the corresponding buttons. The buttons appear when I click into a record, but then the buttons appear for every record. I currently have VBA to make the buttons visible in the form's OnCurrent event. Is there a way to limit the button appearance to the current record only and have them appear without having to click into the record?

If I understand the nature of continuous forms, there really is no way around having something appear for one record without it appearing everywhere. Of course I would like to confirm before I start making changes.
 

sneuberg

AWF VIP
Joined
Oct 17, 2014
Messages
3,506
If I may piggy back on this thread, I'd like to know that too. We have a subform with continuous forms and we have a delete button on these forms which shows up on the new record. We put in code so that it doesn't do anything, but we like it not to appear.
 

Minty

AWF VIP
Joined
Jul 26, 2013
Messages
6,542
One method is to have the buttons in the header or footer and store the current records ID in the header / footer and base your actions on that , you can then hide / disable the single header buttons easily.

The other route on the detail line is to make a text box look like a button and use conditional formatting to make it "vanish" / "disabled"
 

sneuberg

AWF VIP
Joined
Oct 17, 2014
Messages
3,506
The other route on the detail line is to make a text box look like a button and use conditional formatting to make it "vanish" / "disabled"
Thanks, but I remember trying that and it worked so far as the making it appear and disappear, but there was something negative about using a text box as a button. I can't remember now what it was.
 

Minty

AWF VIP
Joined
Jul 26, 2013
Messages
6,542
Maybe use a label instead? I normally use the first method.
You can also use sub forms to get your buttons to the left or right of the data without them being on the form itself.
 

nstratton

Registered User
Joined
Aug 30, 2015
Messages
85
So I'm storing the buttons in the footer with a textbox storing the current record ID. Is there a way to change the record using the MouseWheel event or something similar? I'm thinking the end user is not going to think to click in the record area to make the record change. That's the only way I can get to change as of now at least.
 

smig

Registered User
Joined
Nov 25, 2009
Messages
2,086
In a continous form all buttons have the same name so there is no way to work on a single button.
Best way, as Minty said is using a textBox or label with conditional formating.
 

gemma-the-husky

Super Moderator
Staff member
Joined
Sep 12, 2006
Messages
13,873
I have a few continuous forms where various fields get enabled/disabled according to the row. When you click the row, all rows change. User get used to the behaviour really quickly with no problems. If they click on row 4, all they want is row4. They aren't really bothered what row 3 and 5 show.
 

nstratton

Registered User
Joined
Aug 30, 2015
Messages
85
The buttons I am wanting to show will eventually open a document based on what is in the record. So the idea I was having was if the user does not select any criteria then the full list displays (obviously) and as they are scrolling through be able to see which documents can be opened (i.e. buttons show).

Of course now that I spell it out, it sounds like I could use a text box and use the double-click event to make it happen since that ensures it is record specific and will show like I want. Buttons just look better than text boxes which seems to be my main hangup.
 

smig

Registered User
Joined
Nov 25, 2009
Messages
2,086
There is no way to put a subform on a continous form.
What I do is creating creat as topform we ith two subforms. One is the continous one and the other one is the 'subform'. I send the selected record to the topform and the 'subform' is updated based on this. You can show all record's details and put your button here.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom