Forms :: Filter Form Using Checkbox And Combo

Aug 21, 2013

I have a reservation form and I want to tick a checkbox that will filter the form based on what is in the "Reservation Status" combo box.When the checkbox is ticked, the code would remove all records that have "Complete" as a status in the "Reservation Status" combo box. The non-working code that I currently have is:

Code:
Private Sub chkHideComplete_AfterUpdate()
On Error Resume Next
If Me.chkHideComplete = True Then
Me.filter = "[ReservationStatus] = 1"
Me.FilterOn = True

[code]....

View Replies


ADVERTISEMENT

Forms :: Add Additional Filter To Unbound Form - Checkbox?

May 27, 2015

I need to add an additional filter to my unbound form and can't seem to get the syntax right -

I have a text field in my form "[B Style]" that has either a "Y" or "N"

I want to add a checkbox on my main form where, if checkbox=True then [B Style]="Y"

Private Sub ckBStyle_Click()
Dim stFilter As String
Dim stDocName As String
stDocName = "Modify_OpenItems"
If Me.ckBStyle.Value = True Then
DoCmd.OpenForm stDocName, , , ("[B Style]" = "Y")
Else: DoCmd.OpenForm stDocName
End If
End Sub

stDocName is opening but is completely blank.

Incorrect syntax?

View 1 Replies View Related

Forms :: Filter Text And Checkbox?

May 24, 2013

I'm having a hard time with this (what I thought) was a simple filter. I have an unbound checkbox (chkFlag) and an unbound text box (txtfilter). The filter was working fine till I decided to also try to filter on the checkbox.

I'm trying to filter records that either have either a check in the [Flag] field or have some part of the text in various other fields. The problem is I can get the records to filter if the checkbox is checked or on text in the various fields, but not both. I've tried using AND and OR, but it's not working.

Code:
Me.RecordSource = "SELECT * from tblContacts; "
'-------------------
strWhere = ""

[Code]....

View 4 Replies View Related

Checkbox Filter On Continuous Form

May 27, 2015

On my continuous form, I have a field that is a checkbox. I would like to place an unbound checkbox/radiobutton in the form header so that when the it is checked, it will display only records that are checked, and when it is unchecked, it will only display records that are unchecked.

View 2 Replies View Related

Forms :: Combo Box Filter Continuous Form

May 16, 2013

combo boxes and continuous forms.I have a continuous form (works great), with two combo boxes that navigate (rather than limit/ filter the list) to the desired selection.One for suburb and one for postcode.

I have expanded the select criteria for the suburb to include postcode as some suburb names are used in more than one state. (I do not want to have to select a state, then suburb).I changed the column count to see the postcode next to the suburb, however when the selection is made only the first instance is selected.

Example.
Epping 2121
Epping 3076

If I chose Epping 3076, Epping 2121 is selected and the continuous form navigates to that suburb (rather than the one with 3076).Can I change this so that I can still search by postcode, or search by suburb and have the form navigate to the corrected suburb postcode combination?

View 5 Replies View Related

Forms :: Two Combo Boxes To Filter Form Won't Work Together

May 8, 2013

I have a database and a form that is based off of a simple table. The table has NO look ups and all of the formatting is text. The form is continuous and simply displays these fields. (Kind of like a company roster with name and department). I have two combo boxes at the top of this form in the header with the intent of filtering the form records by department and employee type (lets say A or B).

I have tried every way I know how to get these records to filter and they will not filter correctly. Utilizing methods I have used in multiple other databases, I set the two comboboxes to cascade based on a query in the recordsource. The vba I'm using in the after event of each combo is ....

Me.Filter = "[Brand] = '" & Me.cbobrand & "'"
Me.FilterOn - True
'Brand is the "department" and the other identical code is for Personel_Type

This filters the records but independently. So, cbobox1 filters the records to show all Brand 1. When cbobox2 selection is made it shows all the Personel_Type of the selection however the first filter is already disregarded. (i.e. When cbobox2 selection is made, it contains both brands instead of the one I've just selected and filtered in cbobox1. )

Outside of making two queries to account for each possible filter, I have tried setting a filter on the filterON, I have tried a SQL based VBA code, I have tried making two forms and attempting to set the filter on open but either way, nothing keeps the first filter selected (or the FilterON, or both SQL filters, etc). The ONLY way I have found to get it to filter both is with the filter function in Access, which is not useful as my users will not have access to the menu bars.

I have this EXACT same setup in another database and it works fine with 3 cbo boxes with an after even to set a filter for the recordsource for all three.

View 5 Replies View Related

Forms :: Access 2010 - Form With Combo Box To Filter Data

Feb 6, 2014

I have a modal form with a combo box and a search button.

When the button in pressed, the value of the combo box is the parameter of a query.

Copy and paste of the search button code:

Code:
Private Sub btnSearch_Click()

Dim db As DAO.Database
Dim qdef As DAO.QueryDef
Dim strSQL As String

[Code] ....

I've tested the SQL query produced by the search button and it works, but when I try to push the button, I receive an error on the following line:

Set qdef = db.QueryDefs("qryFilteredData")

View 6 Replies View Related

Forms :: Filter A Form Based On Date Selected From Combo Box

Dec 29, 2013

I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.

the code is:

Sub SetFilter()
Dim LSQL As String
LSQL = "select * from Preventive_Q_View"
LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"
Form_Preventive_View.RecordSource = LSQL
End Sub

How do I modify this code to work with the date combo box? Also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?

View 1 Replies View Related

Forms :: Split Form With Combo Box As Filter Allow Edits False

Sep 6, 2014

I have a simple split form with datasheet on the bottom and a couple of comboboxes (unbound) on the form header which the user can use for filtering the data. When some users open the form the allowedit property of the form is set to false, because those users can only view the records. But the result is that also the comboboxes cannot be set, hence no filtering!

View 6 Replies View Related

Forms :: Combo Box Selection Controlling Checkbox Availability

Oct 6, 2014

I have a project database where I keep track of the work in progress on monthly bookkeeping for our clients. I have a form where I use a ComboBox to select the client and another ComboBox to select whether a sales tax report must be filed Monthly, Quarterly or Annually. I have 17 CheckBoxes one for every month, quarter and year-end. I want the selection in the sales tax reporting ComboBox to trigger which CheckBoxes are available to check.

That is, if "Monthly" is selected in the ComboBox, then only the 12 monthly CheckBoxes are available to check (the 4 quarterly and 1 year-end CheckBoxes will be disabled). If "Quarterly" is selected in the ComboBox then only the 4 quarterly CheckBoxes are available to check. Of course, "Annual" is the third option. The disabling of CheckBoxes must be on a record by record basis. "Monthly" could be selected for one client (one record) and "Quarterly" for another client (another record).

View 14 Replies View Related

Modules & VBA :: Selecting Combo Value Changes Checkbox On Other Form

Nov 10, 2014

I have form 1 that brings up a record, I then open up form 2 with that record details.

On the 2nd form I have a 'status' combo box with values 'OK', 'bad', 'unsubscribe'.

I want to change the value of a checkbox, 'Active', on the 1st form, 'Maildelivery', from true to false if the combo value is changed to 'bad'

Here's the code:

Private Sub cmb_status_AfterUpdate()
If Me.Status <> "OK" Then maildelivery.Active = 0
End Sub

View 3 Replies View Related

Forms :: How To Filter Combo 2 From Table After Select Value From Combo 1

Nov 5, 2013

i have a table with three column Named

1-State
2-City
3-Customer

on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1

View 1 Replies View Related

Forms :: Setting Up A Combo Box To Filter Another Combo Box

Jan 27, 2015

I'm having a little difficulty setting up a combo box to filter another combo box. I've actually got one working but the second one is giving me all sorts of errors. On the attached database, there's a form called frmAddNewRecord. At the top of the form there's a combo box which allows you to select a name and another combo box beside it which acts as a filter so only names from a certain section are shown (working fine).

The subform which is attached to this form and contains the training details, has another combo box which allows you to select a job...I've tried to add a combo box beside this to filter it but I can't get it to work.

View 5 Replies View Related

Problems Using A Combo Box To Filter Records In Another Combo Or A Sub-form

Nov 8, 2004

I have seen a few articles here and there on using a combo box to filter records in a sub-form and to filter records in another combo box, but I am not getting anywhere. I hope someone can belp

Exercise 1

For this exercise, I have the following tables:

tblClients containing client names
tblProjects containing some project details

I want to set up a simple form, so that the user can select a client name from a combo box on the main form which filters the project detail records in the Projects sub-form.
Once the user enters project details, I want this info as well as the selected ClientID to be fed back to tblProjects.


Exercise 2

I have the following tables:

tblProjects as above
tblWorkstream containiig names of workstreams and some other details.

Every project has one or more workstreams

I have a form where users will enter hours worked on each workstream. They will first select Project from a combo box on the main form. This should then filter records to be displayed in the Workstream Combo box, before they can then enter hours.



Please let me know if you need me to explain any part of this better.

Thanks in advance.

ps. I am a novice, so I'm hoping to do the above using default MS stuff, not with complex programming!!!

Thanks

View 14 Replies View Related

Checkbox-filter

Oct 29, 2005

Hello,

I ve got a big problem:) What i am trying to do is CRM , this crm has some informations about the companys. ----->

I have form where are all the informations about companys entered by users of CRM. One of the informations is size of the company. What i did is that i have put three check boxes ( small , middle, large ) and bound them with the main table company ( companyID, companysmall ( YES/NO ), companymiddle(YES/NO), companylarge ( YES/NO ), companyfax, ... ).
When you mark the check box ther is an yes in table for a size of company and no for the other two options.

What i would like to do is to create another form where i could filter companys by ther size. But the tricky part is, that i would like to filter with check box so that i can filtr for example small and large companys at same time.

How can i do this - can you help me - mabe some examples.

Thank you,

Luka

View 1 Replies View Related

Forms :: Filter Two Fields Using Combo Box

Jan 15, 2014

In Dec 2013 I created an Access table "Donations" that contains fields regarding charitable donations (Date, Donor, Amount). I use an Access form "Select Donor Form" to select a specific Donor (via combo box) from the table. Then an Access Query "Select Donor Query" uses the Donor selected from the combo box in the form to display all of the donations from that Donor for the year as an Access report.

Since I just created this Access table last month, it only had data from 2013. Now that we are in 2014, in preparation for when I run this report next December, I obviously need to modify "something" to clarify that I want the donations from a specified Donor for a particular year (i.e 2014, 2015, 2016, etc.).

I added a field to the Access table called "Year". I probably can derive the year from the already present "Date" field, but sadly, I don't know how to do that. I want to simply edit the existing combobox in the existing form to return Donors that have a record in the existing table where the Year = 2014. That way, the only changes I will need to make over time is to update which year I need and all of the Donors for that year will populate in the combo box.

Below is the Access macro belonging to the combo box in the form. I converted the macro to Visual Basic. What to add to select the Donor for a particular year. You can see that right now it is only selecting "Donor Name" without regard to which year the donor has a record.

'------------------------------------------------------------
' Combo3_AfterUpdate
'
'------------------------------------------------------------
Private Sub Combo3_AfterUpdate()
On Error GoTo Combo3_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[Donor Name] = " & "'" & Screen.ActiveControl & "'"

[Code] .....

View 9 Replies View Related

Forms :: Using Filter For Two Combo Boxes

May 15, 2013

I am trying to use .Filter for two combo box but it does not work...My code is:

Private Sub btn_buscar_Click()

With Me.FormularioEmpresas.Form
.Filter = "" 'limpiar el filtro
.FilterOn = False
If Nz(Me.cbo_actividad, "") <> "" Then
.Filter = "Actividad='" & Me.cbo_actividad & "'"

[Code] ....

In the the black line appears an error...I do not know why..

View 3 Replies View Related

Forms :: Filter A List Box Using Combo Box

Jul 16, 2014

I have a list box and a combo box on a form based on a query. The list box is a multi-select, with column values of Client, ClientEmail, and Medical.

Medical is a simple yes/no field, and it is what I want the combo box to sort by. I have a Where clause in the query: WHERE (Medical=[forms]![frmOne]![cmbbx]), and the only values in the combo box are Yes and No (1 column). I also have the combo box set to run a requery macro after updating. I've also tried to change the macro to VBA:

Code:
DoCmd.Requery "lstbx"

When I pick a string from the combo box, the list box just goes blank, rather than updating to clients who either do or don't have Medical, and I can't understand why.

View 1 Replies View Related

Checkbox To Filter Table

Mar 17, 2005

Hello!

i have a small for you probably problem! I tried to find something here but only bits and pieces could help only a little!

well here is my problem!

i have a form with a subform! the subform is a datasheet by a table!

In my main form I have a check box! what I want to achieve is to filter my subform by current date when i mark the check box and remove the filter when i uncheck it!

i could have it done by query or something but it was a last minute idea! thus i would have to change a lot of stuff doing it that way! the table is already filtered by a combo box record selector!

-----------------------
i have used a code but it does not work probably because there is no filter to activate!

Private Sub Today_Filt_Click()

If CheckBox = True Then Me.FilterOn = True
If CheckBox = False Then Me.FilterOn = False

End Sub

So could i put the filter parameter on the vba part???


any sudjestions????

Thank you :)

View 5 Replies View Related

Checkbox Filter Query

May 31, 2005

Hey i have this really annoying bug, theres several tick boxes that im using to filter records but if i tick more than one i get a syntax query error? any idea what this could be? i have had several people look at the code and tell me theres nothing wrong.

Option Compare Database
Option Explicit
Const strSQL = "SELECT * FROM issues"

Private Sub filter_Click()
'Variable to hold filtered SQL string
Dim strFilterSQL As String

If check_os98 = True Or check_osnt = True Or check_os2k = True Or check_osnt = True Or check_osxp = True Or check_fxpda = True Or check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strSQL & " WHERE "
End If

If (check_os98 = True) Then
strFilterSQL = strFilterSQL & "os98 = True"
If check_osnt = True Or check_os2k = True Or check_osnt = True Or check_osxp = True Or check_fxpda = True Or check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_osnt = True) Then
strFilterSQL = strFilterSQL & "osnt = True"
If check_os2k = True Or check_osxp = True Or check_fxpda = True Or check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_os2k = True) Then
strFilterSQL = strFilterSQL & "os2k = True"
If check_osxp = True Or check_fxpda = True Or check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_osxp = True) Then
strFilterSQL = strFilterSQL & "osxp = True"
If check_fxpda = True Or check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_fxpda = True) Then
strFilterSQL = strFilterSQL & "fxpda = True"
If check_fxpc = True Or check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_fxpc = True) Then
strFilterSQL = strFilterSQL & "fxpc = True"
If check_fxas = True Or check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_fxas = True) Then
strFilterSQL = strFilterSQL & "fxas = True"
If check_fxrs = True Then
strFilterSQL = strFilterSQL & " AND "
End If
ElseIf (check_fxrs = True) Then
strFilterSQL = strFilterSQL & "fxrs = True"
End If

strFilterSQL = strFilterSQL & ";"
Me.RecordSource = strFilterSQL
Me.Requery
End Sub

View 14 Replies View Related

Forms :: Filter Button On Form As Filter

Aug 1, 2013

I have placed a filter button on a form as a filter and written the following on-click event procedure:

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdApplyFilterSort
Me.Filter = "ACCOUNT_DO_NOT_EMAIL = 'HS'"
Me.FilterOn = True

When I click the filter button I get a blank message box titled 'Microsoft Access" and an OK button, when closed the filter works perfectly.I have checked this procedure in other forms and it works without showing the blank message box.The only difference with this form is that its control source is a union query.

View 10 Replies View Related

Forms :: How To Apply A Filter On Subform From Combo Box

Jun 17, 2013

I am trying to filter a subform based in a combobox. What im doing wrong, is it the Sintax? This is what i have so far..

Private Sub Buscar_Click ()
Dim strFilter As String
strFilter = Me.CombNomes.Value
Me.subfrmBANCO.Form.Recordsource = "[Nome]=""&strFilter&"""
Me.subfrmBANCO.Requery
End Sub

'subfrmBanco is a subform based on a table called "BANCO"'
'[Nome] is the field in BANCO that im trying to filter on
'CombNomes is the combobox im using as filter parameter

View 10 Replies View Related

Forms :: Filter Subform By Updating Combo Box

Dec 14, 2014

I have a table contains 5/6 column. now i need to filter the table on a form randomly.

Suppose I have 6 different combo box for 6 column. Now on the sub form the control shows the whole table. i this case i have clicked the 3rd combo box, then it will show the whole column in its list. if i select any one of it the table will show the common values below. then i will click the second combobox which will populate the present data shown into the subform table after the first filter.

After that i wish to filter the fifth column where the fifth combobox will populate the data after the second filtering.

By all means the active data into the column will ony populate into the combobox.

View 1 Replies View Related

Forms :: Filter Subform By Combo Box Dates

May 28, 2013

Currently I have a main form w/ subform. In the main form, a user selects a bond's serial number from a combo box and the subform displays the bond's returns for the months owned along with a start date (each month has its own start date). So if I enter bond ABC in combo box, the subform will display "13-01-01, 4%" for January, "13-02-01, 8%% for February..etc.

So if we owned a bond from January to March, it will display the three months' returns. I want to add two combo boxes: begin and end date so that I can filter the subform to only show a particular set of months' returns.

I have three tables right now: Cusips, which lists each bond's serial number, CusipStartPK, which lists the monthly returns for each serial number, and ParameterDates, which is a list of four start dates--ie 13-01-01 for January, 13-02-01 for Feb, etc.

I've tried parameter queries and vba codes from other threads but I can't get this to work.

View 4 Replies View Related

Forms :: Filter Combo Box Value - ID Is Bound Column

Mar 15, 2014

There are 3 column in a combo box, ID is bound column

Part no ID Description
0040 1 class 40-1
0040 2 class 40-2
0040 3 class 40-3
0041 4 class 41-1
0042 5
0042 6

When key in part no 0040, 3 rows under 0040 will be listed out only, filter and match as value entered only. do not show others part no in the combo box selection.

View 1 Replies View Related

Queries :: How To Filter Checkbox Field

Jul 29, 2013

I have a query which is run from a form via a command button. On this form i have a couple control sources (not sure if this is the correct term, but i have text boxes and drop down lists which the query uses in its criteria).

Everything works fine except i can't figure out how to filter my checkbox field (aka MyDeliv). I'd like to have a drop down box with 3 options: "yes", "no", and "ignore". i would like "yes" to return only records with the MyDeliv box checked, "no" to return only records with the MyDeliv box unchecked, and "ignore" to return records regardless of the MyDeliv checkbox.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved