Hopefully I've explained myself good enough this time. Can't seem to get a real answer. Trying to make it so when I select certain tabs, certain controls on the left will disappear or reappear.
http://img43.imageshack.us/img43/7533/scrnshotg.jpg
Also, when "Stats" is selected, I need it to auto-select "Frequency"
Ex. On click/focus/select (whatever, nothing seems to work)...
ComboBox.Visible = True
Thank you.
Handle the TabControl.TabIndexChanged event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tabindexchanged%28v=VS.100%29.aspx
Related
I'm having some trouble with a database in Access. One of the forms is too big for the monitor and spills over off the edge of the screen. Now, this wouldn't be an issue if I could just set the form to full screen using the Minimize/maximise buttons.
However, no matter what I try (Changing from Tabbed/Overlay, ensuring the Controlbox is on, Min Max buttons on, Modal on) the Min Max buttons still do not appear. They do appear after going in and out of design mode, but that's not something I can ask the end user to do. I'm wondering if some VBA code would help but I can't find anything that will work, is there anything you fine people suggest?
Thanks in advance!
I am returning to coding after a long hiatus, and have come across a tiny issue that has me baffled. What I'm trying to do is simple, and it worked perfectly until I copied the controls from the winform and placed them in a tab control.
Very simply, I have a yes/no combobox with a conditional statement making a date time picker visible if the combobox is set to "Yes". Since moving the controls into a tabcontrol (The project had so many controls, I had to condense them for space). What's really crazy is I have a subroutine that resets all the controls in the project, and it still works.
when it worked, it looked like this:
If cmbAssessment.SelectedIndex = 1 Then
dtpAssessment.Visible = True
End if
(TabControl is named tcNursing and form is frmNursing)
I just can't figure out how to reference these controls inside the Tab Control.
It seems like solutions from Googling the issue are very complex. I'm finding it hard to believe this is
a complex problem. Thank you for ANY assistance at all!
As it turns out, Jimi, you were on the right track. There was nothing obviously wrong with the event handlers, although deleting them and re-adding them solved the problem. Thank you all for your help in this matter!
I am doing a project of managing a database. Here I have to make a checklist wherein a check box in an MS-Access 2007 form employees have to check in so that their responses get registered in the database. But, after a certain time, that is the deadline field, I want to disable the check box so that no more checking in is allowed. I am completely new to VBA. I would be very thankful if someone could help me out or guide me through the programming part of this.
In your VBA that will control this checkbox, there's a few options you can use.
MyCheckBox.Enabled = False
MyCheckBox.Locked = True
MyCheckBox.Visible = False
The first one will disable the control and grey it out.
The second one will lock out any changes, but it stays the same color.
The third one will completely hide it.
Hope this helps. Good luck.
Embarrassingly, I think I am missing something rather simple here but I just can't seem to figure this out. I'd would like a calculated field to appear in the subform header or footer, but I can't even get it visible.
I checked the property sheet settings of the subform and it clearly states: "Form Header--visible. Display When--always".
Appreciate any help in this unnecessarily frustrating matter.
When you right click on the detail, make sure you've selected Form Header/Footer, not Page Header/Footer
Not OP's issue, but this might help other newbs like myself.
Make sure you have selected a suitable default view, such as single or continuous form.
I am creating a web control in vb.net that contains a list box. I know that I am able to choose a selection mode of Single or Multiple, but I am interested in limiting a Multiple selection to a predetermined size. For example preventing a user from selecting more than 3 items.
I have tried adding a Validator to the list box, which might be a way forward, but was wondering if there was a way of changing the selection mode to something a bit different than just the two specified ones.
Any ideas or suggestions would be greatly appreciated
Edit: Unfortunately due to project limitations I am unable to use Javascript on this problem. very annoying I know!
You could try handling one of the SelectedIndexChange events. With multiple selection, each time this event fires you can check how many items have already been selected. If it is more than you want, have the handler deselect the one that was just selected. You could also put up a little red label under the listbox saying "Sorry, no more than [n] selections allowed."
EDIT:
Just noticed you said WEB. Same theory applies, but it would have to be done using Javascript.
On the SelectedIndexChanged event, write a short piece of code that will check the number of selected items and if it is greater than your desired amount, unselect the new selection (or unselect the oldest one, or however you wish this to operate).