I have a dropdown field that I want to be able to enter a custom value. I do not want this value to be added to the table. In Microsoft Access, there is an option to 'LimitToList = false'. So instead, I created a Virtual field with the dropdown options. I also have the actual field called 'ItemName'. If someone uses the dropdown, the option will be copied to the 'ItemName' field. If they want to enter a custom value, they can simply fill in the 'ItemName' field. Here is my script:
<script> function EnterCustomValue() { var v_standardOption = document.getElementsByName("cbParamVirtual1")[0];
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Scottster
I have a dropdown field that I want to be able to enter a custom value. I do not want this value to be added to the table. In Microsoft Access, there is an option to 'LimitToList = false'. So instead, I created a Virtual field with the dropdown options. I also have the actual field called 'ItemName'. If someone uses the dropdown, the option will be copied to the 'ItemName' field. If they want to enter a custom value, they can simply fill in the 'ItemName' field. Here is my script:
<script>
function EnterCustomValue()
{
var v_standardOption = document.getElementsByName("cbParamVirtual1")[0];
document.getElementById("insertRecorditemName").value = v_standardOption;
}
document.getElementById("cbParamVirtual1").addEventListener("change", EnterCustomValue);
</script>
If the dropdown is used, it gives me an error saying the filed is empty.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.