473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

date or value based on checkbox?

Hello, I have a report that pulls a date from a query, but they'd like an option where if they don't want to enter the date, they can check one of 2 checkboxes. Check box 1 would return "N/A" and checkbox 2 would return "TBD"
I'm not sure how to accomplish this? I've never had to do anything with more than 1 checkbox. Is it possible? I'm 100% comfortable with access but this has fallen to me.
Aug 14 '15 #1

✓ answered by Seth Schrock

An option group is a group of radio buttons or checkboxes that only allows one to be selected at a time. The option group then gets its value based on the option selected. You would then use this in a select case to see which option you want to return.

8 1221
Seth Schrock
2,965 Expert 2GB
It sounds like an option group would be better unless you want to be able to check both checkboxes.
Aug 14 '15 #2
I'm not sure what an option group is, I'll watch some youtube videos and come back if I have questions......
Aug 14 '15 #3
Seth Schrock
2,965 Expert 2GB
An option group is a group of radio buttons or checkboxes that only allows one to be selected at a time. The option group then gets its value based on the option selected. You would then use this in a select case to see which option you want to return.
Aug 14 '15 #4
I've got this working a little bit, but is there a way to not have this option group be required? We only require the text box, or 1 of the 2 options. If a user accidentally checks a box from the option group, there's no way to unselect it that I see?
Aug 14 '15 #5
Seth Schrock
2,965 Expert 2GB
You can either add another option to your option group that specifies to uncheck all options or create a button to uncheck the options. Either way, the code would be
Expand|Select|Wrap|Line Numbers
  1. Me.OptionGroupName = ""
Aug 14 '15 #6
This is all working, thank you Seth!
Aug 14 '15 #7
Seth Schrock
2,965 Expert 2GB
Glad to be of assistance. Good luck on your project.
Aug 14 '15 #8
Thanks, I'll be putting another question in before the day is over :)
Aug 14 '15 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: abcabcabc | last post by:
I write an application which can let user define own date format to input, How to convert the date string to date value with end-user defined date format? Example, User Defined Date Format as...
6
by: Aussie Rules | last post by:
Hi, I have a datepicker that show a calender. The user picks a date and the time component is always 00:00. I then have a drop down that provides a list of times, (10:00, 11:00 etc), and I...
11
by: garyusenet | last post by:
I have 'cli via c# on order', and in the mean time am reading 'Pro C# 2005 and the .NET platform' (Andrew Troelson). I'm just reading about the 'five types defined in the CTS'. Specifically Struct....
0
by: torpecool | last post by:
Hello Everyone, I have been trying to find information about this issue in the documentation and have not been able to. I hope someone can help. I built a web-based app (PHP) that allows...
0
by: =?Utf-8?B?SGVtYW50?= | last post by:
Hi all Thank you in advance. i need to know How to Bind Checked value of checkbox into sql Server database. please help me
8
by: Rob Wilkerson | last post by:
Surprisingly (at least to me), there doesn't seem to be a built-in function to validate a date value (like, say, is_date()). Given that, is there a best practice for determining whether a value is...
3
by: Cron | last post by:
Hi I'm trying to Dcount *unique* records by comparing a date/time field. I say *unique* because the field contains a date/time but I need to ignore the timestamp and work off the date only. I...
9
vikas251074
by: vikas251074 | last post by:
I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why...
3
by: Miranda Truehill | last post by:
I'm very new to programming and although I've seen a similar post that addressed this in part, I am unsure how exactly to go about this. I know I can utilize the DateAdd function but don't know...
1
by: BaseballGraphs | last post by:
Hello, I am requiring some assistance in creating a function that will be able to look up and return a value based on an ID using javascript. I am having a user click a checkbox and the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.