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 Replies


ADVERTISEMENT

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 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

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

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 :: 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 7 Replies View Related

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

Tables :: Syntax Error When Transferring Records With Checkbox Filter?

Jan 8, 2014

I'm trying to transfer records from a table in one subform to another subform (on same form) using a checkbox as a filter:

Private Sub TransferAndReview_Click()
Dim db As dao.Database
Dim strSQL As String
strSQL = "INSERT INTO Forms![Extra Work Report Checksheet]![Equipment Input Subform1].Form[(QuantityUsed[, HoursUsed])] VALUES (QuantityUsed[, HoursUsed]) FROM Forms![Extra Work Report Checksheet]![Equipment Checksheet Table Subform] WHERE [Extra Work Report Checksheet]![Equipment Input Subform1].Form[EquipmentUsed]=True;"
Set db = CurrentDb
db.Execute strSQL, dbFailOnError
End Sub

The Main form is: [Extra Work Report Checksheet]

Subforms are: [Equipment Input Subform1] & [Equipment Checksheet Table Subform]

Checkbox field is: [EquipmentUsed]

I keep getting the error "Syntax error in INSERT INTO statement" which points to 'db.Execute strSQL, dbFailOnError' and I don't understand why. Neither of the fields [QuanityUsed] or [HoursUsed] are lookup fields, etc.

View 7 Replies View Related

Modules & VBA :: Filter Records - Adding Unbound Date Listbox To Filter String

Feb 10, 2014

I'm trying to hash two scripts I've found into 1 functioning filter, however I'm still relatively new to vba and can't figure out how to get this working.

I'm trying to use Allen Browne's Search Criteria:

with another snippete of code I found here:

Code:
'Purpose: This module illustrates how to create a search form, _
where the user can enter as many or few criteria as they wish, _
and results are shown one per line.

[Code]....

It's the date part I'm having trouble with, the rest of the search criteria work fine without the date, but I can't get it working when I try to modify and merge the date sections of each code.

Also I'm using a listbox for the "Yesterday";"Last 4 days";"Last 9 days" and not a combo box.

View 2 Replies View Related

Forms :: Command Button - Set A Default Filter And Filter On Load

Aug 13, 2014

I have a continuous form based on table "INCOMES" that shows all the payments received, which mediums can be (field "PMNT_MEDIUM"):

- check
- transfer
- taxes
- cash

Table "INCOMES" is filled using another form, but in this particular form I just want to show "check", "transfer" and "cash" (not "taxes") so that I can track all the cash incomes.

Note: taxes are loaded because they appear in my invoices and I need them there to reach the invoice total amount.So my form has a search bar which allows me to search by PMNT_MEDIUM listing all "checks", all "cash" or all "transfer". I can also search by payment number (meaning: check number). To that end I have a "search" button that applies the filter. And I have another button that "cleans" the filtering by "putting a "" in the search-bar and then calling the "on click" of the search button".

What I need is, no matter if I click over the "search" or "clean" button, it NEVER shows me the "taxes".Search button, on click code:

If IsNumeric(Me.busq_chq_med) Then
Me.Filter = "[PMNT_MEDIUM_NUMB] =" & Me.SEARCH_BAR
Else
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*'"
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*' or [INVOICE] like'" & Me.SEARCH_BAR & "*'"
End If
Me.FilterOn = True

Clean filter button, on click code:

[SEARCH_BAR] = ""
Call [Search button]_click
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*'"
Me.FilterOn = True

View 14 Replies View Related

Forms :: Dynamic Filter With Multiple Possible Filter Criteria

Jan 26, 2015

I have a form that is showing data from 1 table. That table has 12 different fields on it and I want to be able to filter based on selections I make in a combo box in the header of the form. The filter string must be dynamic enough to allow filtering based on 1 criteria selected, or multiple criteria selected. For example:

If I have values in filter fields 3, 5, and 9 I'd want the filter string to be created as follows:

"...WHERE field3 = field3filter.value AND field5 = field5filter.value AND field9 = field9filter.value"

If I have values in only field 7, I'd want th efilter string to be created as follows:

"...WHERE field7 = field7filter.value"

And so on and so on.

I have created some filters before but all of the different VBA syntaxes I'm using seem to come up short.

View 5 Replies View Related

How To Create Filter Button On Form And Filter Records

Nov 26, 2012

How can I create a "Filter Button" on a form and filter my records? I create a textbox on a form and a filter button on the right. Then I click the filter futton, the filter function will search/match the content in the box through the datasheet. And then the results of the filtering will be pop up on the split form datasheet.

View 3 Replies View Related

Filter A Report USING A Forms Filter Results

Oct 25, 2006

I am using MS Acess2000 and need to make a report that will be passed around with production work. My primary key is the invoice number of the work order. Currently to open an invoice i have a macro, attached to a query with the following qualifiers; Like [Enter invoice]

This pulls up the current record fine.
for the form and flags the folloing in the property filter sectin of the form

(((([CustomerTableMasterRef].[Invoice]) Like [Enter invoice])))

PART 2

Now I am trying to use microsofts how to filter a report using a forms filter...
This picks up on the Invoice query as shown above but does not just insert the query results...

Is there better code or another way to approach this... Currently i am using:

Name:cmdOpenReport
Caption: Open Report
OnClick: [Event Procedure]

Private Sub CmdOpenReport_Click()
If Me.Filter = "" Then
MsgBox "Open an Invoice First"
Else
DoCmd.OpenReport "rptCustomers", acViewPreview, , Me.Filter
End If
End Sub

Using this code not only does my report not detect the correct fields to import data (no data is filled in) but it requerys the invoice or atleast should, which I could do with out all of that code...

Where should i go from here?

View 1 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

Checkbox Help!

Feb 28, 2005

:rolleyes: :rolleyes:

Hi to all

I got 2 checkbox.

checkbox A
checkbox B

When I check on checkbox A, checkBox B is also checked.
can this be done?

Please help and thanks a lot.

View 1 Replies View Related

Help With QBF And Checkbox

Mar 31, 2006

Hello all,

How do I write a QBF query such that when a check box on the form is clicked, the name of query runs based on the name of that checkbox.
I have a form called, QBF_Form, which has a series of checkboxes. Each checkbox has a name. I have a table, "Type", and I would like to run a query based on the information on the form, ie. when I click a check box, the query gets the name of the check box and runs the information based on that.I know the basic qbf is:

[Type] Like [Forms]![QBF_Form]![Type] & "*" Or [Forms]![QBF_Form]![Type] Is Null

But I don't know how this would work if I have a check box for values in field "Type" in my table.

Thanks for your help!

View 4 Replies View Related

Checkbox

May 9, 2006

Iwant to suppress the message "The macro or function set to the Beforeupdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field".
The message is correct-Iwant to prevent updating the checkbox if certain conditions aren't met.
Any ideas?
Thanks

View 4 Replies View Related

CheckBox

Aug 29, 2006

Hi,

I do NOT want to create one field for check mark in the table. I just want to make temporary checkbox to select the record in the continuous form.

But, When I put a check mark on one record, the check marks are shown on all records in the continuous form.

How can I fix it?

View 1 Replies View Related

Checkbox Help...

Oct 27, 2006

I have a form that has a business address, business name and business number. I have a checkbox in the form, if they click the checkbox i'd like to have it copy the fields above to anther a field. What do i have to do in order for that to work? I've never did anything like this...Can someone please help

View 3 Replies View Related

Why Does AND Filter Also Filter NULL

Nov 24, 2006

Hello Everyone,Been a while since I needed to post on this forum, but I found something rather disturbing today; either that or I have missed something obvious. I have a large query of financial data, and I filter out certain codes which I don't want to include. The filter is;<>"BL01" And <>"SS01"Which works as it should, filtering out all BL01 and SS01. However, it also filters out any NULL values, which is something I would not expect it to do. When I enter NULL as a filter, I get the records I expect. What am I doing wrong here? I am using Access 2003 SP3 on Windows XP Service Pack 2

View 4 Replies View Related

Yes/no Checkbox Problem

Jul 12, 2005

I have successfully created a mailmerge in word 2000 using an access table for data.

There is an access field which is a Yes/No Checkbox and it does not display the way i need it to in the merged document. Instead of seeing a ticked or unticked box i see o 0r -1. Can anyone please help me?!

I am no great computer wizard and would appreciate fool proof help!!! :(

Many thanks in hopeful anticipation......

Lesley

View 2 Replies View Related

Checkbox Not Working

Nov 28, 2005

I installed Microsoft Office 2003 on my computer. It asks me to register the product otherwise not all functions will work properly. I was curious so I didn't register it and started an Ms Access Application. Interestingly, when I clicked on a checkbox in a form , nothing happened.
After registering the product and going back in to the mdb the checkbox worked just fine.
Any one ever seen this before or know what causes that?

Thanks

View 1 Replies View Related

Checkbox Selection

Jan 30, 2006

I want to make sure that only one check box can be checked and also to make sure that on is selected, i.e. to display a warning that one is not check if someone is going to save the record. Any ideas guys?

Thanks

View 1 Replies View Related

Help! With A Checkbox Problem

May 31, 2007

hey all, i have a supplier table (Supplier), that has a yes/no check box column field depending if they are active or not. About 200 suppliers in all, many of which not active.

I want to be able to automatically set the active field to True within the supplier table depending on the condition that records exist in my delivery schedule table (Schedule)

SO for instance if a supplier name "Power" exist in my delivery schedule, then i want supplier "Power" in the supplier table to be checked i.e True. I guess some form of dlookup is needed here, but not im not sure where to start. Any help appreciated!

View 2 Replies View Related

Checkbox Issue

Feb 3, 2008

Hi Guys,

I am having an issue with my programing an access database for my business. I use access a lot and i am profecient in the area.

I want to be able to select services from a sub from using check boxes. The selected check boxes are then assign to the customer using a unique id that is generated from customer_table.

I have created a the sub form and the check boxes and have attempted to do to the above by building queries. For information on the queries i used please let me know.

Anyway, I am now looking for a solution in the sub form that i click on a button it then assigns the unique ID to the services so that i am able to see customers details the services that have been selected and the total sum.

Any help would be appreciated on this as i been working solind on this now for more than 72 hours and i am drawing blanks.

Thanks in advance

Powster

View 6 Replies View Related







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