I have set up an option group to display a text value on the database table; however, I still need to click onto the default value for it to be entered. Can I set the option group to automatically select the default value?
Will
I have set up an option group to display a text value on the database table; however, I still need to click onto the default value for it to be entered. Can I set the option group to automatically select the default value?
Will
you might try, on a new record, or even the form's load event (or the current event too) to write a line of code in:or whatever it is.Code:me.optiongroup.defaultvalue = -1
So here's what I have so far. I have four sets of these with different option names. I'd like the default value to be under case 1 for all of them when a new record form is opened up.
One more issue. The option group won't enter the text value for "Negative" in the table unless I first select another option and then select the first option again.
Private Sub optwnvres_AfterUpdate()
Select Case Me.optwnvres.Value
Case 1
Me.[WNV results].Value = "Negative"
Case 2
Me.[WNV results].Value = "Positive"
Case 3
Me.[WNV results].Value = "Suspect"
Case 4
Me.[WNV results].Value = "No Test"
End Select
End Sub
Thanks
Will
One more issue. The option group won't enter the text value for "Negative" in the table unless I first select another option and then select the first option again.
Does the code make sense at least?
Also, each time you select an option it greys out instead of displaying a clean black dot. If you select another option group all displayed buttons on the previous group then grey out.
option groups have two groups of options:
1) one value only allowed
2) multi-select
this is not the same for different types of option groups though. if you've spec'd #1 in the property sheet, the rest will grey out, I think, but not sure. your code, it looks to me, changes another option group based on what the current group's option is, right?
remember too, that option controls, and groups too, have values AND descriptions associated with them. they can get confusing. the VALUE, which is normally not displayed on the screen, is what Access should be putting in the data table.