Database Fields With "select All That Apply" Option
Jul 25, 2007
I'm trying to create a database from a pretty large survey. The problem I'm having deals with some questions having the option to "select all that apply." For example, one question deals asks, "What conditions did this patient have prior to admission? Select all that apply" and below 30 or so different medical conditions. Then below that, another question might ask, "What procedures were performed after the patient was admitted. Select all that apply" followed by another large list of procedures. And below that a question asking about all possible drugs a patient was given.
So, I realized because of the "select all that apply" option, I had to list out every condition, procedure, drug, etc, as a separate field with a yes/no option. So instead of having a field that said "medical_conditions_prior" with hypotension, chf, diabetes, etc. as options, I had to create fields for each conditions, such that my fields were "medical_conditions_prior_hypotension", "medical_conditions_prior_chf", "medical_conditions_prior_diabetes", etc, and the options were "yes/no."
However, I recieved an error message saying I had two many fields. So I changed my approach and tried to create a primary table and then a table for each survey question that had "select all that apply" option. So, in my primary table, I would have a field that said "medical_conditions_prior" with a yes/no option. And I would create a table with all the medical conditions with a yes/no option. But, I have no idea how to correctly link these tables, as there are no two fields in the table that match, such as a primary table organized by novels and a secondary table organized by authors, but still having a novels field.
View Replies
ADVERTISEMENT
Dec 9, 2014
I have a form with 5 options in a group. This works fine when I only have 1 filter applied to each button. I need to select the "Not Collected" button and have it filter out and show "Collected = No" and "Deleted = No". Here is my code..Case 3 is the one I'm currently working on. I can get the others once I figure out the first one.
Private Sub Frame799_Click()
Select Case Frame799
Case 1
[Code].....
View 6 Replies
View Related
Aug 22, 2005
Hi
I've got an Option Group with 3 options; Yes, No and Future.
I also have a range of Check Boxes; 1 for every day of the week.
When one of the check boxes is selected I want the Option Group to change to Yes.
Currently, the Option Group defaults to Future and No will only be available by manually selecting it. This doesn't need to be changed.
Any help will be greatly appreciated!
Cheers
View 2 Replies
View Related
May 9, 2013
I'm trying to implement a macro to filter through accidents to see if my company has already been hired on a particular case.
In the first form the user enters the date, location, and last name of one of the drivers. Then they click a button which opens a new form as a datasheet with accidents that match ANY of the three controls. Evidently, I need a filter that contains some form of a series of OR operators.
However, whenever I try any variation of a button that opens the second form and then applies the filter, I always get no matches.
View 12 Replies
View Related
Aug 21, 2004
Hi there!
i have a list of provinces in an option select right, so when i
click one province i want it to chance the header of my page
according to the provinces, and i have no idea on how to do that.
Can someone please help with some code!
Kind regards
Phindile
View 1 Replies
View Related
Apr 17, 2005
I have a user who can't operate a mouse and I want to make it possible for him to select from an option group using only the keyboard.This is possible if a default button is stipulated, but can it be done when there is no default?
There is no event associated with the keyboard in an option group, only with the controls within it. I tried using the Got Focus event on an option Button, but entering the control doesn't cause the options to receive the focus, seemingly.
Any ideas, (they don't have to be fully formed) would be gratefully accepted.
View 7 Replies
View Related
Aug 22, 2007
I am developing an Event Management DB for business training courses. I have an attendees table with a link to CompanyNames. I wish to be able to produce an attendees report based on the CompanyName ie all attendees from the selected company. I have done this by using a dropdown of companynames on a Criteria selection form. This works well.
What I would also like to do is print the same list without the companyName criteria. I am aware I could make another query but was hoping that maybe there is a way of setting up the criteria in the companyName field so that it could accept either a company name or ALL company names.
Hope someone can help.
Thanks
Peter
View 2 Replies
View Related
Aug 17, 2004
Hi,
Asked this one yesterday but I think I must be doing somthing wrong. I have a main form named "Techdata" on this form I have an option group with 2 option buttons. I would like when selecting the first option button for the subform "effectivity" to show up on the main form. When the second button is selected I would like the subform "effectivity single" to show up in the same place where "effectivity" was(would like effectivity to be invisable then).
Can anyone walk me through this from whoa to go as Im havn a lil bitta trouble
Thanks for your time everyone
View 3 Replies
View Related
Sep 25, 2006
I can create a customized Input Mask, however there are two possible structures that the data may take. I think that this should be doable by the use of two fields, if it can be done with one field it would be preferable for searching options. If I have to use two fields there would only be one or the other used for each record so I would prefer to have the unused field inhibited. Either way the code work is beyond my present ability, any assistance would be appreciated.
View 1 Replies
View Related
Jan 7, 2015
I am trying to set up a listbox with an option to select multiple items (I have done this and tested it with debug.print and it seems to work). I am then building a filter statement with VBA. I want to then use a button to add this statement to the filter in a subform with (a datasheet design), and then requery it.
My code below seems to be working in part. But I am getting all the items at times. Seems to work consistenly when selecting one item only, but I can't see anything wrong with my 'OR' statements when I debug.print.
Private Sub Command176_Click()
Dim i As Integer
Dim strFilter As String
Dim blnFirst As Boolean
i = 0
If Me.List163.ItemsSelected.Count = 0 Then
[Code] .....
View 3 Replies
View Related
Aug 23, 2014
I have a form with an option group to select subforms to be displayed .To save space on the main form I have added a subform (frmSubService) to the option group to display some of the data that was originally on the main form. The subforms data source is the same as that of the main form but only displays five fields.
After editing data in the subform frmSubService, if I then click on a field on the main form no problem, however if I click on an option button to view another subform I get a messagebox pop up with the following message;
The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-Edit the record.
If I click OK,and without re-editing the record, I can open another subform.
I have checked and the data changes made on frmSubService, in both cases, has been saved.
How do I prevent the pop-up message?
View 3 Replies
View Related
Oct 13, 2005
Hi, all--
Perhaps a silly question:
I want to use an option group with a seperate check box for yes and no for a series of yes/no fields. I find that when I do this, once a record is started all have these items have "no" checked. I tried defaulting the value to null and other such things, but to no avail.
Any ideas (while retaining the concept)?
Thanks.
Paul
View 1 Replies
View Related
Aug 28, 2005
hey, i hav seen a similar thread about this (i think bout a year ago or so) and i didnt no whether to continue it or start a new thread.Option boxes - Making items visible
that thread did not fully answer my question and after searchin around n finding nuthin i hav decided to ask
in my form i have the payment methods=> cash, cheque, credit. i did have these in a drop down menu, but i wasnt sure how to do what i wanted...which is based on the selection either make a couple of fields (credit card details etc) visible or invisible. so what i have done is changed the drop down list into an option group with radio buttons.
i currently have this coding
Code:Private Sub Frame_Click()If Me.Frame.Value = 3 ThenMe.CardHolder_Name.Visible = TrueMe.Credit_Card_Number.Visible = TrueMe.Expiry_Date.Visible = TrueMe.Type.Visible = TrueElseIf Me.Frame.Value = 2 ThenMe.CardHolder_Name.Visible = FalseMe.Credit_Card_Number.Visible = FalseMe.Expiry_Date.Visible = FalseMe.Type.Visible = FalseElseIf Me.Frame.Value = 1 ThenMe.CardHolder_Name.Visible = FalseMe.Credit_Card_Number.Visible = FalseMe.Expiry_Date.Visible = FalseMe.Type.Visible = FalseExit SubEnd IfEnd Sub
this seems to work although say if my first record has credit card selected, then all the fields are visible, but wen i move onto the next record which is cash or cheque...they are still visible until i reselect cash or credit again..(and vice versa)
i hope this makes sense :P
thanks
View 3 Replies
View Related
Mar 26, 2014
I had to modify how I was storing data on one of my tables. I changed checkboxes to an option group with the values ranging from 1 to 4.I need to count each of these entries for a report which will run them into another formula.I am trying to use the below - obv I'm doing something wrong.
Code:
Police: Sum(IIf([OType],1,0))
And this is the original SQL for my queries if needed:
qry_BLT_RCCounts1
Code:
SELECT Year([tblBlotter].[EntryDate]) AS [Year], Month([tblBlotter].[EntryDate]) AS [Month], Sum(IIf([OType],1,0)) AS Police, Sum(IIf([OType],3,0)) AS Ramp, Sum(IIf([OType],2,0)) AS Terminal, Sum(IIf([OType],4,0)) AS AOA, ([Terminal]+[Ramp]+[AOA]) AS TRATotal, ([Police]+[Terminal]+[Ramp]+[AOA]) AS TotalChecks, Year(DateAdd("m",-1,[tblBlotter].[EntryDate])) AS PrevYear, Month(DateAdd("m",-1,[tblBlotter].[EntryDate])) AS PrevMonth
FROM tblBlotter
[code]....
View 5 Replies
View Related
Aug 13, 2006
Hi there
Is there any way to control the "show" criteria in a query from option groups... i.e... a check box for someone to say if they want to view items in the query or not? (But not to affect the actualy query data in any way).
Cheers!
View 6 Replies
View Related
May 20, 2014
I have combo boxes set up with the different choices for major, minor, year, etc. Is it possible for these fields to have an autocomplete option? For example, there are about 30 different subjects that students can choose for a major, so rather than having to look for it in the drop down menu, could the person entering the data just start typing "ant" and have it automatically fill with "anthropology" for example?
I should also mention that the reason I made these fields into combo boxes is because I built SQL in the row source so that it is bound to the primary key but displays the description instead (with the column widths set to 0; 1).
View 2 Replies
View Related
Apr 16, 2013
Is there another field that can be used beside the lookup field in an Access table? I am currently using the lookup field as a multivalued lookup field and I am limited to the the things I can do with it when creating a report or a query on that field. Is there a similar field in Access 2010 that has the same look as a lookup field and allows for multiple values to be selected?
View 4 Replies
View Related
Jul 28, 2014
I have a form that I want to expand to show more fields depending on whether a user decides to or not.
Basically there will be 5 fields that a user always completes for this form, however depending on whether they answer yes or no on the final field I want it to expand the form and have some further fields that need completing.
If they select yes it should expand, if they select no then the form is complete.
What are some possible ways of achieving this?
View 3 Replies
View Related
Feb 16, 2006
Hi all, just wondered if anyone would have an idea of the best way to implement this? I have a customer database, the relationships are below, and currently have done searching by town/city, street, purchase date, and also searching by area. But now the person i created it for wants to be able to search by 'groups of areas'. He has written how he would like to be able to search and they often include 3, 4, or 5 areas grouped together as one, and in only one or two instances he has included a small town aswell as a few areas.
Basically, it's been a while since i actually made the database (a year or so) and have not been using access much at all, so i'm having a bit of trouble working out how i'm gonna go about it and would like some idea's :D . I'm sure once i get back into the swing of it i'll be ok, but i feel like a newbie again at the moment :o :rolleyes:
Many thanks for any help you can give.
http://img349.imageshack.us/img349/7052/relationships8na.jpg
View 14 Replies
View Related
Oct 4, 2014
I have a form with option group (two option buttons) and date fields (to select a date range). The form should pull/pass parameters from the query. There's a form button that generates a report based on the query.
Issue: I can't figure it out how to link option buttons and date range to the query so when the button is clicked it generates the report with chosen criteria. The form is for the user to enter parameters.
View 14 Replies
View Related
May 20, 2015
I have a fully functioning login screen with a combo box for name and a password box. It also has an option to create a new user or exit the database. On my main form I want the employees to have to log out of the database as opposed to close it out. How would I go about this? Also I need tracking login and logout times for each employee.
View 3 Replies
View Related
Sep 28, 2012
I linked table rawdata from a database called competitor from a ODBC Database. I run a query with to make a table with a criteria where it retrieves roughly 10 columns with 719,000 rows. And it gives me this error.
(Cannot open database". It may not be a database that your application recognizes, or the file may be corrupt.
I asked the creator of the database and they said the database grows automatically and it was created with the same Access version as i am using to run the query.
Also when I do a RUN without creating a table and just selecting and displaying the data it does not give me any issues.
View 4 Replies
View Related
Aug 10, 2015
I have an option button for a field [Fully Paid] (Yes/No) in my LoanT and i want to know if it's possible for my database to automatically choose an option depending on a calculated field
(Calculated field from another query) = [Outstanding Balance]
Say... if [outstanding balance] is = 0 or negative (refundable), then Yes should be On, if not it should remain No/off so that i wouldn't have to go over every record and manually choose the option
The option button is very useful when i want to display loans which are Paid and/or still active. How do I go about this?
View 14 Replies
View Related
Mar 14, 2008
I’m really stuck on how to create: Check Boxes/Option button/Option Group in VBA.
Could someone help on either all of them or some of them please?
Thanks
Richard
View 2 Replies
View Related
Aug 18, 2006
I am using an Access database for a foreign language dictionary project.
One of the forms I use is populated by a query (qryLemmaTable) to retrieve information from tblLEMMA.
This form works precisely as I intend it to work, but there is a glitch on it that is driving me mad.
The form in question has an option group with 11 radio buttons that correspond to the parts of speech associated with each word in tblLEMMA.
When I click on the button optAdjective I apply a filter and the only records that are displayed are adjectives. (The same applies for Nouns, Verbs, Prepositions etc.)
Here is the glitch: even though the radio buttons apply the filter correctly, no “black spot” appears in the button. Other signals on the screen let me know what word type is selected, so I can accomplish what I want, but I want the “black spots” too!
Perhaps this will be a clue: For each radio button I use the following code in the GotFocus event.
Me.FilterOn = False
Me.Filter = "wordtype = 'A'" ‘(or N, etc)
Me.FilterOn = True
And this for the Lost Focus event
Me.FilterOn = False
Thanks for the help.
View 3 Replies
View Related
Sep 15, 2006
I've made a form with list boxes on, the user's selections from which are taken as parameters for a query, created by VBA code.
I want to add a final list box to the form from which the user can select which of the available fields they want to see in the query output (i.e. has the same effect as checking/unchecking the "Show" checkbox for each field on the standard query design grid).
I have written the following code to try and do this, but it isn't working. I'm very new to VBA and wonder if anyone can help me out by showing me what's wrong?
'Build Field List
If Me!lstFieldList.ItemsSelected.Count > 0 Then
For Each varItem In Me!lstFieldList.ItemsSelected
strFieldList = strFieldList & "[" & Me!lstFieldList.ItemData(varItem) & "], "
Next varItem
strFieldList = Left(strCriteria, Len(strCriteria) - 2)
Else
strFieldList = "'*'"
End If
'Create Query String
strSQL = "SELECT Centres." & strFieldList & " " & FROM Centres " & _
"Where " & strCriteria & _
" And " & strCriteriaCtr & strSortOrder & ";"
Running the above gives an error, and the section under "'Create Query String" is highlighted in debug mode so I guess the error must lie there? Either that, or the earlier part where strFieldList is being create is generating something which strSQL cannot interpret.
Many thanks in advance if you can help me.
Gary
View 12 Replies
View Related