i have a form bounded to a table called street.
this form has 2 bounded text boxes:
country: lookup field to the country table
city: luukup field to the city table
i want to do the following: when GetFocus on the city text box, i want to filter in thi stext box for all the cities that belong to this country (value in country text box)
how?
When using the MS Works database the "Find" command makes a new table of all records that include the chosen words. The "Find" command on Access 2002 does not do this, nor does any filter command. Is there an easy way to do this in Access?
i have a data sheet form which I need some help with!! I have a lot of data that I need filtering.
The first filter is for day and the second is for time of day. I.e. i want to be able to click on a date (using the calender from MS datepicker) and have the datasheet return the records for that selected day.
But I would also like another field that can filter it down to a specific time of day. e.g. 27/06, 13:00 returning all the records for this specific time slot.
At the moment there is a filter for date AND time but I would like date AND/OR time.
Also I would like to have it setup so it automatically gets rid of data over 2 months old, is there a way to do that, if not automatically maybe with a macro/command button??
Hey all I am having a problem with my form filter. I was wondering if you can just direct a filter from form 1 to form 3 without referencing form 2. I am thinking not cause I am having a problem getting the filter to work. Here is the code I have in my load form.
I have this database that list companies and what type of loan they have. I am having a hard time thinking of the right type of filter to use. I am looking to select multiply types of loans and have it filter out the companies that have that service. I was thinking of a list box or options but I am having trouble with the table. My question is how would you go about it? Thanks
hi hope someone can help. I'm making a form to select country/state/city for members i made a table with 3 columns country,state,city
i wrote down the states for 2 countries (the ones i'm gonna use) the city is left blank (since i don't want to write down all the cities just yet)
i'm looking to do:
When i try to display the Country as a drop down using a query that selects the column for country, i get a list of the same country the amount of times it is in the table for each state. I only want to see each country once. even though in the table it is written several times.
Is there any way that I can import a text file and split the data into three columns without having to go through 65000 lines of text.
It is basically a print off of a directory structure. I have a very large text file that lists the files in folders for each of hundreds of users. I need to divide the information up into three columns so that the below data:
I'm creating a database for agents to use at work. Because they will all be using it at the same time, I need to create a combo box on the form that will filter the contents to only show those with their name in them. Is this possible?
I am new here and was wondering if anyone has ever had the following happen:
When you 'Filter by Selection' in a table for NULL values the number of records shown are less than the actual number of records with NULL values. For example, I tried this with a particular tables looking for NULLL records in a particular field and while I could clearly see that the number of NULL values was x, the number returned upon filtering on NULL in that field was less than x.
Any idea? Your help is very much appreciated. Thanks!
Hello Everyone. I'm not all that new to access however my problem does exceed my experience and I'm hopeing someone out there maybe able to help me.
A while back I began to build a database to keep track of post production activites such as what items were being produced on a perticular production line. Its my job to book all these items in according to date, line, item, order and qty.
This was all good and simple until it was decided that I had to assign a category to each item. Their are multiple models to one perticular category and to make things even more difficult the same item could be produced on more than one production line.
I work within a Pool company where their are 7 production lines, each with their own purpose and facilites of making certain products until you come to other products that could be produced on any of 3 or more lines.
So, I made a table 'Category' which lists the different types/acronyms for products and the lines in which it could be produced on. I than created a new column within my Post Production table called 'category' and chose to use a drop box so I may select which category to assign the item. The drop box shows both columns 'Catefory','Line'.
The problem I have is that theres 40+ rows within the Category drop box and because the same name of the category may appear more than once simply beginning to type in the category name isn't good enough.
Is there a way to filter out which categories is listed within the drop box according to which line it maybe coming off once I've already selected which line within the same row?
I've tried selecting a relationship and createing a query both failed.
i have about 14 fields that relate to subjects, basically i want to be able to run a query that searches for all the people who have choosen the module and report bak who they are..
now i know i can do this 14 times over but is there a way that the user can choose the subject first and the query will then run hence meaning only one query/report.. i thought of using a list/combo box but have absolutely no idea...
im very much a novice but any help would be most apreciated!
So I have a lot of data that sometimes needs filtering by Date, or Date and Time. Is it possible to have a drop down box to display everything for a specific date, and then another combo box to filter even further for specific time slots.
I have a query filtering question. Please note attach pic for further details. I am trying to put together a search in a form to seach for a certain color or color series from a Qery from two two different sources (from a Combo Box and from a Text Box). I am not sure how to set this up in the query.
Can someone please point me in the right direction?
I've created a database to keep track of all our Microsoft licences for the company. Just to make sure we're fully licenced, to allocate where needed, and to help reallocate when we replace a pc.
I have 2 tables, 1 hardware (listing PC ID,location etc.) and 1 software (listing software type, software licences, and to which PC ID allocated).
What i'm trying to do is filter the pc's missing either an Office licence or a Windows licence or both, so i can base a report on the results.
How would I about filtering out all results that contain a letter in them? The entries are in a field called Code, and I only want to display the resources that don't have a letter in the code.
Hello i am an engineer working on an access program and i have hit a little snag. I know i am missing one small little code but i can not seem to figure it out.
I am trying to view everything in one category but one item. It is about 20 different dealers and i want all of them but one. I know if i want to view only one i type "dealer" but what do i type is i want to view all of them but one?:confused:
OK, new problem to solve. I don't know if I am going about this the right way, so please feel free to make suggestions on better ways to acheive an outcome!
I have a query "qryBuildsPrinted" which searches a specific table for appropriate records, feeds these selected records into a report "rptBuildSlips" and prints them.
I am now trying to allow the user to print these build slips selectively, instead of printing out the whole lot pulled in by the query every time. My approach is to use the existing query, but filter the query based upon some selections made by the user in one of my forms. I am having trouble getting the query to filter successfully.
I realise that you can filter both the query and the report independently, so I probably only need to filter the report, but that is not working for me either!
Here is my code:
Private Sub cmdPrint_Build_Slip_Click() Dim intBikeID As Integer, intBuildID As Integer Dim varItm As Variant Dim ctl As Control Dim intCounter As Integer Dim intRecords As Integer Dim varArray() As Long Dim strFilter As String Dim blnPrinted As Boolean Dim msgMessage As Variant
'Print Build Slip for selected bike
'Set Control Set ctl = Me.lstResults intRecords = 0 intCounter = 0
'check if a selection has been made (kinda dodgy) For Each varItm In ctl.ItemsSelected GoTo Selection_Made Next
GoTo CleanUp
Selection_Made: 'Count how many records have been selected For Each varItm In ctl.ItemsSelected intRecords = intRecords + 1 Next
'Clear Array and Re-allocate Upper Bound of array (Array starts at 0) ReDim varArray(intRecords - 1)
For Each varItm In ctl.ItemsSelected
'determine BuildID of selected record intBikeID = ctl.ItemData(varItm) intBuildID = DLookup("[BuildID]", "tblBuilds", "[BikeID] = " & intBikeID) blnPrinted = DLookup("[PrintedSlip]", "tblBuilds", "[BikeID] = " & intBikeID) If (blnPrinted = True) Then msgMessage = MsgBox("One of the bikes selected has already had a Build Slip printed. Please adjust your selection", vbOKOnly, "Build Slip Already Printed") GoTo CleanUp End If
'Fill array with values, given how many values are present varArray(intCounter) = intBuildID
'Adjust counter to go to next array value intCounter = intCounter + 1
Next
'Select Filter String Select Case intRecords Case 1 strFilter = "[BuildID] = " & varArray(0) Case 2 strFilter = "[BuildID] = " & varArray(0) & " Or " & varArray(1) End Select
'Open query which displays the bike selected DoCmd.OpenQuery ("qryBuildsPrinted") 'DoCmd.ApplyFilter , strFilter
'Print report of query with filter applied DoCmd.OpenReport "rptBuildSlips", , , strFilter
A further question that is probably on the same topic is that once this has been completed, I also need to modify my existing Update Query which makes a modification to the data in the table. Is it possible to apply a filter to an Update query also?
I realise this may not be the most effective use of Access, so as I said, please feel free to suggest alternate methods I can research.
I have a sub form to which I want to apply filter buttons. I have used the wizard to set these up. The problem I have is that when I try to filter the SubForm the MainForm also filters. The forms are based on tables and not queries.
I have a subform on my main form. Note that there is no relationship between the recordset of the main form and the recordset of the subform.
I need to be able to change the filter on the subform dynamically during run-time. I know this sounds a little odd because in theory I should be able to drive the subform off the main form using the LinkChildFields / LinkMasterFields.
I wonder if anyone can help. I attach a table that is a material list (27000 records). When I add a new material I want to be able to see the last part code I created for a particular supplier.
For example C001, C002 and C003 are for a supplier company called Chapters so I would scroll through the combo box search list in the form for the last one and create a new record called C004. The problem is that E00001, E00002 for a company called Edwards supplies 20,000 items so it's a long way to scroll through to create a new part code called E20001. How can I show in the form what the last part code is for each Supplier?
I attach the form and table as I'm not very good at explaining this, although I have had to delete approx 20000 records as the database was too big to be posted. Any advice/help would be greatly appreciated, many thanks
okay so im quite new to access and was wondering if you guys could help me out..
I'm creating a database for a CD shop (school project) and my searchfrm currently has a combobox which enables users to search by Artist, CD or Song and then type their search text into a textbox.
my problem is, that the form which contains the resulting data contains data from multiple recordsources and i can't find a way to display it correctly.
If i set the openArgs in the openform command to Me!combobox most of the data is displayed as #Name? and if i set it to Me!combobox.Column(2) the data is no longer filtered as it should be, and instead all data is displayed...
how do i go about fixing this problem?
Also, is there any way to get my form to open at a specific Tab as opposed to always opening on the first tab..? I want to be able to change the default open tab of the form depending on which option users select from the combobox (Artist, CD or Song)
Anyone has any idea about how to filter a form depending on values of a subform?
For example:
There is a main form that displays the students of a school one at a time and a subform that displays the courses that each one has selected. A button on the main form opens an InputBox so that the user can enter a course to see the students that have selected it. So I want after the user presses enter to have the main form filtered to show only those students.
After changing the combo (RepSort), the listbox is blank. I have tried this with a table as source and as a query as source. Also with and without the requery.
If someone can spot what is wrong with the code, please fill me in!