I have set up a Form to report Client acitivity by department Code for a given month. Users have the option within the form of selecting a Department Code.
These department codes are derived from a department Code Table and set accordingly within my Row Source properties.
If I wanted to select multiple departments for a particular report. how can i allow for wildcard entries i.e if several department code begin with letters OD*?
I have a form with a combobox whose list items are taken from a table of currencies (called tblCurrencies)
Row Source = SELECT [tblCurrencies].[Ccy] FROM tblCurrencies ORDER BY [Ccy];
Problem is, there may come a time when the currency they want to select is not yet part of the tblCurrencies table, and needs to be added. For simplicity, I'd like to have an additional option in the dropdown (perhaps at the bottom) to specify a new currency.So an additional list item (e.g. 'Add New...') which when selected could prompt a subform where the user could specify the new currency (and any other relevant details specific to that currency) which can be programmatically added to tblCurrencies.how do I get that extra option into the list items for the combobox?...
I have built a search form to feed information to a query. The form uses combo boxes tied to table values, and all have wild cards built into them so if the user leaves the combo box they get all the records. I also have to text boxes representing start date and end date. I would like to allow the user to leave these blank and get all there as well. I have been looking through my one Access book, as well as searched all over the internet, but I cant seem to find the way to do this. My filter criteria for the text based combo boxes are like this:
Code: Like "*" & [Forms]![ReportDesignF]![Company] & "*"
My filter criteria for the Start and End Dates looks like this:
Code: Between [Forms]![ReportDesignF]![StartDate] And [Forms]![ReportDesignF]![EndDate]+#11:59:59 PM#
In this case of the user leaves the date values blank, the query returns nothing. I would like to return all dates if that is the case. I am assuming it is my lack of knowledge of wild cards and how they work with date values.
I want to include a validation on a form. I have an auto number field called ID and a field called Nature Of Incident. I only want to have the auto number generated if the Nature of Incident is NotNull.
I am trying to get a wildcard search to work with a form.
I have a query, in which the criteria is:
Like "*" & [Enter a word] & "*"
That works fine. I enter a word, and I get the few records in which the word appears.But if I try to replace [Enter a word] with a word entered on a control on a form, it doesn't work - I get all the records. This is my code:
I did export the table data into a tabbed delimited format and will include that at the end. If you want to reproduce my bug copy that data in a txt file and import that into the table tblMain. Make a search form and a sub form. the sub form is linked to the table and the main form is unbound with two search buttons.
Problem Statement:The code works fine. I did find a bug that seems to arise with the wild cards when the entire field values are entered. You can replicate the bug by testing the search criteria listed below.
This is a brief example of the bug. A detailed description is near the code below.
If my name is "Devtycoon" and I search "Dev" the SQL statement will build "*Dev*" and it will pull up my name, "Devtycoon". On the contrary if I search "Tycoon" the SQL statement will build "*tycoon*" and it will pull up my name, "Devtycoon". If i search "DevTycoon" the sql statement will build "*Devtycoon*" and no results will be returned. That is buggy because the name is in the database but no wildcards would be needed.
Form1 contains the controls for search criteria. Three text box controls are used to filter a sub form control called "DS". The sub form is called sFrmMain and is a datasheet that shows results of the search. there is a button that runs the code and another button that clears search criteria and shows all records. Both button's code set the sub form's record source using an SQL string built using a function that returns a segment of the overall search string using the contents of each control that then is concatenated into a SQL statement used to set the record source.
There is a function for the following components of the SQL statement
SELECT / FROM WHERE controlA = me.txtSurname controlB = me.txtOrganization controlC = me.txtProgramTitle This is how you can replicate the bug.
I tested two additional surnames organizations and program titles as follows:
Try example (1). you will get both the 4's and the 14's records returned.
If you type in letter for letter of the second record (the one with the 14's) no records populate. It is like the wild card does not like it if you type in the entire field value. Uncle Gizmo's and Allen Brown's method do the same thing were no records populate if the 14's entire surname organization and program title are entered into the text controls. Can you reproduce this error? Other than that I think either method is bulletproof.
Example criteria
1) put the following criteria in each control then hit the search button
4 surname 4 organization 4 program title [two records returned]
2) put the following criteria in each control then hit the search button
[no records returned] 14 surname 14 14 organization 14 14 program title 14
I gather that there is no way to include a scroll bar on a memo field in a form. What is the best workaround? The source is a mysql odbc table. It is set as medium text and comes into Access 2010 as a memo field. For a user coming to this field to read the material entered there, unless they click somewhere within the field, there isn't a scroll bar. It isn't obvious that that is what they need to do to see all of it. Is there any way to work around this limitation?
I'm trying to make a filtered search form using "*" as a wildcard default value in combo boxes, this works for all the text fields except for the account number field (Numeric primary key). After quite a bit of reading up and searching, I tried using the following as the row source;
SELECT customers.ACCOUNT_NO, customers.CUSTOMER FROM customers; UNION SELECT "*", "All" From Customers;
Trying to filter a form based on a field with wildcard. My form has a txtCustFilter control where a customer's name can be entered in part or whole. The Customer's name is in PCCustomerName
This code works but, I'd like to make it case insensitive
Dim strFilter As String strFilter = "[PCCUSTOMERNAME] LIKE ""*" & Me.txtCustFilter & "*""" Me.Filter = strFilter Me.FilterOn = True
Including check boxes (representing the query fields) in an interactive access form, in order to decide which fields should be visible.
I think the solution is building an invent in VBA for each check box, however I'm not an expert in Access VBA and don't know how to write the code.
In the example that I've uploaded, in the Form1, when I run the query, all fields are displayed, i.e. VENDOR, REGION, CUSTOMER and MATERIAL are displayed. How can I manage it in the form with a listbox to display only the REGION or MATERIAL for instance.
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
I have a rather annoying and frustrating problem which I cannot find a solution for through searching the forum.
The situation is that I have a parent form with 1 unbound subform, the source of which is determined by the part number selected in the parent form (diffetrent parts have different fields of the source table displayed)
This all functions perfectly well in all but one case which is when the source of the subform is a form with an option group.
There is only 1 form like this, and the problem I have is that when tabbing through the fields, as soon as I tab into the option group the parent form disappears, and I am left with just the subform on screen! Clicking into the group is fine, just tabbing to it causes the problem, and if I remove the option group then tabbing through all the rest of the fields is fine...
I could powssibly change the option group for a set of option buttons and code them to function a bit like an option group, but this would mean changing the code for numerous reports etc. and I don't really want to do that if I can help it.
I have a form based on a query that has 16 options for values in one of the fields. I wanted to put an option button for each value on a form that would allow the user to view the records based on which option buttons were selected and have the form update accordingly.
The way I've gone about it is to have some code in the after_update event thingimy of each option button that updates a boolean value in a table that's linked to the underlying query the form is based on - but this just seems a long way to go about this... plus it's not working...
I've searched the archives for clues on this but haven't come up with anything. So I just wondered, is there a better way than what I'm doing. I'm not after somebody to do this for me, just point me in the right direction.
i have field in my table called SEX and there are two types Male & Female and i added two option boxes in my form and i search one specific record with query now i want this when we run form or navigate through record so as record change so as well two option boxes shld change for example if i navigate to next record and that record have MALE as sex in table so option 1 shld b black doted and when sex is Female then option 2 shld black doted and vise vers. how can i achieve this trhough coding
tblProducts "categories" requires the IDNumbers of the categories in tblCategories - there are mutiple IDNumbers for each product, and they need to be seperated by a comma - for example ProductA has categoryIDs 1,3,6 (where categories 1,3,6 and called A,C,F)
At the moment, I am having to manually look up what each categoryID number is by CategoryName, and then type it in the tblProducts category field.
I want to have a form which provides the tblProduct "Name" and then a long list of all the tblCategory "Name" contents as option (or tick) boxes. So all cateory Names listed.
Then when I tick mutiple boxes on this form for the categories, it populates the tblProduct "Categories" field with the tblCategories "IDNumber" codes, with a comma between each one! (so the names chosen actually populates with the ID number)
So basically if on my form, ProductA has category A,C,F ticked -- so the field tblProduct "Categories" is "1,3,6" (where 1,3,6 are the category IDNumbers and A,C,F are category names)
In other words, I want to be able to choose the categories for my products by choosing the Category Name (rather than ID) but having the ID populated into the relevant field -- I can do this with a combo box displaying a different field to that thats populated....but this only allows one selection....
I want mutiple categories to be chosen (via the form with option/tix boxes), and thus to populate the relevant field with commas seperating.
Hello, I have a form named Welcome which I want to use as search menu for my database. I have added 4 option buttons and a unique textbox into which users will write their query criteria. My database has 4 queries and each option button should refer to one of them once selected
Obviously I will need a command button that will run the query.
How to create a Web Form and include an option group (5 or 6 radio or check boxes)? I really need the page to layout all of the options (not in a drop down). This will allow users compare answers on the fly looking at the form.
I have a form with an option group. Within the option group I have a series of queries (all records, closed records, open records, etc.) to sort the data. Everything works fine.
My issue is a cosmetic one. When I change the query via running a report versus the option group, the option group doesn't reflect the correct status (e.g., I run a report for all closed records but the option group still shows All Records). In my VBA, is there a line I can write to change the option group appearance from All to Closed, without clicking on the option group itself?
I'm creating an employee survey database and I'm using option groups for collecting general information such as office, department, etc. My question is can I make it a requirement for them to answer an option group before moving on to other questions? I'm trying to control and track how many employees have taken the survey. Right now I can skip these general information questions and just go into the survey questions so I'm trying to prevent that. Also in the same train of thought is it possible to not save any incomplete surveys? Say I have 50 questions and someone starts the survey but only answers 10 questions and then exits for whatever reason. I would like that record to be deleted so it does not count. If I allow incomplete surveys then I can get skewed numbers.
I have a form where the users need to update an option group when they enter any information on the form.
The problem is that the users don't always update this option group.
The option group does not have a default value and has only two options.
When the user updates a form they need to choose a value.
One problem though, they may have to go in and update the form later and this action may cause them to change the option selected within the group.
Is there code I can use to alert them to first update the option group when updating the form and second to change the value within the option group when they need to.
Option Group --- Incomplete and Complete Date Resolved can trigger the Complete option to be updated
I am seriously thinking we should make Incomplete the default value and then I would only need code for changing the option group from Incomplete to Complete.
However, Management wants the Option Group so we can run a report that lists all of the Incomplete and Null values within it.
I am doing a worksheet for college and have been asked to create option groups on a form, but I cannot work out how to do this.
The screenshot shows what I have to do but I cannot get the option group wizard to open.
When creating my form based on the design in the screenshot I dragged the Rate field onto the design view sheet but it has only one option button connected to it, I need to add another one that will be connected to the same field and am not sure how to do it. I did try adding another option button from the control bar but I am not sure if is connected to the same field with the correct yes/no properties.
I have a form that has several drop down menus on it. I use the form to filter the database to only the options that are put into the drop down windows. I have it set up so that every window does not need to be filled in for the filter to work. Now I am trying to figure out how to put the option of a date range on my form as well. The code that I am using to make everything up to the date range work is.