The query for my form has a boolean field with ' like "No" ' in the criteria. I want users to be able to use a command button to change this to ' like "Yes" ' then requery the form.
Basically, what I want to do is toggle between current records ("No" in the boolean) and Archived Records ("Yes" in the boolean).
I have a database consisting of one table with 5 columns, called Name, Zip Code, Model, Serial #, and Reference #
I made a form with 5 text boxes (generically named Field 1 through 5), and then I built a query. I put all five of the table's fields in the query. In the criteria fields of those five columns, I have
Criteria: Like "*" & [Forms]![Search_form]![Field1] & "*" Criteria: Like "*" & [Forms]![Search_form]![Field2] & "*" Criteria: Like "*" & [Forms]![Search_form]![Field3] & "*" Criteria: Like "*" & [Forms]![Search_form]![Field4] & "*" Criteria: Like "*" & [Forms]![Search_form]![Field5] & "*"
However, here in lies the problem: Some of the records don't have a reference field included, and others don't have serial numbers, and etc. Basically, some records have blank fields.
So to find all of "John"s records, we would put John in Field1, and then run the query.
The first criteria is now looking for *John*, which is correct (it might find Jack John, Johnny, John John, or anything else with j o h n in it).
The rest of the criteria are now looking for **.
However, what about the records with blank fields?
John ; _____ ; SDMS71 ; 1231234 ; REF9001 will NOT make it into the query, because that blank field for some reason doesn't meet the ** wildcard!
how can I accomodate this "blank field" problem? I want those records with blank fields to still be included in the query, because they still belong to "John", and that's what i wanted to search for! :(
I have a database with 20 queries designed specifically for my department (SAM). A friend would like to use my database i.e. queries, reports, etc., but her department is named different (PAM).
The the field names in the each of our imported 'data' is the same, EXCEPT, each record in her department data field has "PAM" mine "SAM". However, her department is not part of my data import nor mine of hers nor will they ever be.
How can I, except manually, change every instance of "SAM" to "PAM" in the 20 queries?
Hello, I am trying to change some query critera with a script.
Basically I have a drop down list which I select and once selected it requeries a subform. I would like to change one of my query parameters, specifically the criteria in a column.
To change query "MyQuery" column "Model" criteria, I've tried:
Code:!Queries!MyQuery!Model.Criteria = "Ultra5"
but that doesn't work. Is that even close to being right?
I have built a database with only my department in mind that tracks three types of documents; Which works fine. Now some of my fellow department heads desire to use what I have built.
This is not a problem as their data structure is the same. The difficulty lies in changing the 30 queries. In the queries I hard coded my department number in the receiver (department field) criteria.
Additionally, my HQ is requesting me to perform some analysis on the other department's data. So other than manually changing the department number each time; Can I use a form or report to modify these 30 queries? I attempted to use a combo box but it would not hold the value when I closed the form.
I saw this thread today, http://www.access-programmers.co.uk/forums/showthread.php?t=102036 , but am not sure it will do what I want.
Hi there, I have a search form with a text box (unassigned at the moment). The search I want to conduct, filters the product number by the users search string with the use of * as a wildcard option.
I also have a Query with all the product numbers listed, no criteria set. How can I link the the search string in the search form to the query so when the search button is pressed, it will filter the results.
I have managed to build a macro that will run a query I have in Access but what I would like to do is be able to change some of the query criteria using the macro script or any other way possible.
I have small data base with many tables, one of them a table for equipment wit related details, as below fields.
1-EqipmentID 2-SerialNO 3-Model 4-Coustmer 6-City
I created one normal method query of ACCESS "QueryEQ" on that table , but every time I want to change any criteria I have to edit manual direct to query design .
What I need to do now is to create a form with one combo box showing all "model" and after select any mode I have to press command bottom to change the criteria of the model of the existing query "QueryEQ" and run it and show the result in a subform in same form.
I use expression on the query field, but after I run it, the field change its format from number to text, how to reformat on the query criteria to change the text to integer format?
I have an access 2007 database connect to sql server 2008.I am running a pass though query to search between two dates (this query has been fine for years)
If I now run any search using parameters from 26th March 2014 to date - the query takes 10+ minutes to run.If I then change the date to 25th March 2014 to date - it runs in a nano second.I have not changed the back tables and I have not changed the format the data is saved in.
I have a dashboard-style form that has a list box with tasks connected to a query with line items of those tasks.
I have another query that will only show the line item selected from the list box. This means the query will only have one line item.
I want to have a command button below the list box that, when clicked, will modify the solo item in the second query to change a yes/no field from no to yes.
How can I accomplish this? Also, how can I make a button that deletes the selected line item?
I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form
I have a tabbed form in a navigation form with a chart on it. The records source of the chart is a query. The query runs when you click the tab and takes a long time. I changed the Row Source of chart to "" and that eliminates the query running on form load. I've read many posts on changing that row source when a command button is clicked. I tried
in the onclick event of the command button. This doesn't work. I've tried many variations of the syntax. I don't know if I have to tell the query to run after the row source is changed.
On a side note, the query criteria is based on beginning and end dates entered into text boxes on the form. This all works if the query loads when the form is opened.
You will see it is a simple problem if you know what your are doing.
When entering the joining date I would like the Status to change automatically to Member and when the renewal date is reached I would like the status to automatically change to Renewal but I am unable to work out a formula for this.
Where (([tblList].Date)>=#11/1/2005# And ([tblList].Date)<#12/1/2005#))
Is there any quick way, besides creating a form and run the query based on it, to have this criteria updated itself when it's a new month? I've gotten tired of changing it every month.
I'm trying to add some life to my form by using some different colors, but I can't figure out how to change the color of a button. Does anyone know how to do this? Thanks
Is there anyway to change the criteria in a field without going into design view I bascially need to be able to type in a particular item in a certain field in a query and it return all the results for that one.
The database has over 160000 records and when I try using a form it takes forever.
I need to use a selection from a drop down list to change the criteria in a query as opposed to typing text in a parameter box. This is to allow the user to choose from a list and then click on a command button to move to the next query. There are 20,000 records in the table. The series of queries will take the user to 1 or 2 records in 3 or 4 mouse clicks.
hello, I have a main switchboard that has a button which opens another switchboard, the button is labelled (has the caption) “Reports” but the trouble is when this other switchboard opens the button on here also has the name “reports” but I want it to be named: “open employee report” and if I change the name of the button on the other switchboard it changes it on both switchboards :mad: , anyone know of a way around this?
I have a table named z_ResltsSampleCountMonthly. In that table I have fields SampleSize, Month and LOB.
I have a report that I need to use a Dlookup in order to pull the SampleSize by LOB into my report. However, my report has three columns that change based on the start and end dates for the report. It shows current month plus the two prior months to show a trend.
So I have each column heading update automatically based on the dates the user enters into the start and end date on the main menu form.
If they select 12/1/14 to 12/31/14 the three columns heading would update to October 2014, November 2014, and December 2014. In the table I have the data for all three months so when I use this formula it works but it's putting September 2014 data under October 2014 so I need to have multiple criteria; one being the LOB and the other being the column heading which is equal to the field Month in the table.
I have a form, the view of which is continuous forms. It has information on the left of the screen which the user is expected to manually match to information on the right, based on the suggestion of the underlying query (based on table a and table b)
E.g.
Client A $200 <button> Mr Smith $200.00 Client B $100 <button> Mr Smith $100.01
There is a button "match me" which when clicked runs an update query.
My query is how do I change the caption on the "match me" button to say "matched" just for the one that is clicked? Because it is a continuous form, if I use Command1.Caption = "Matched" or Me!Command1.Caption = "Matched" it changes it for all the buttons on the form.
Newbie here. Just trying to make a characteristic (e.g., color) of a button change based upon contents of a form field. Can anyone please adivise. All help is greatly appreciated.