I have a table filled with computer monitor information (tblMonitorManagement). I had query that uses combo boxes (cboSerialNo, cboRoom, cboDepartment) on a form for search parameters. The query is called qryMonitorManagement_Sub. The results are displayed in a subform (frmMonitorManagement_Sub). This works for both my desktop and also my laptop based forms/queries/tables.
Although this form works when using cboRoom and cboDepartment, it does not work when using cboSerialNo, so I decided to simplify it down to get to the root of the problem...here's what I did.
I created a new form, created a combo box (again called cboSerialNo), and had it look up the serial numbers in tblMonitors. Simple.
I created a query called qryMonitors_Test, added all fields from tblMonitors (not using the * option). I then set the SerialNo field criteria to the contents of the cboSerialNo on the new form. Simple. For now I'm ignoring searching on anything else.
I ran the query with no search parameters before I added the criteria, and it obviously displayed all the records in tblMonitors. Fine.
After adding the criteria (using Build...to prevent typos), I used the form to select a serial number, run the query and get no results returned.
If I copy and paste the same serial number and change the SerialNo criteria in the query to search for that it works fine. As soon as I tell it to search for the combo box contents it returns no data.
This is driving me completely bat-poo. It's nothing I've not done a squillion time before but it just refuses to work. I've got to assume it's a query issue as opposed to a form issue, but things don't get much simpler than this should be!
we have a main table for tracking pickups....some of the fields are combo boxes with relationships to other tables....one such relationship is units (ml, gallon, ounce, etc)...in the main table everything works just fine....a user enters the location info, the amount and the corresponding units. thus, an example would be a user picks up something from building X, room 101, 10, Gallons.....the 10 refers to the gallons, the user picked up 10 gallons...
now for the query: i'm creating a query for which i will base a report on...in query design if i just select the above info everything works fine....it comes out on the report as 5 Gallons....however, what i'd like to do is concatenate the two fields so that they take up less space on the report and are more visibly appealing...here's what i tried in query design: Amt: [amount]&Space(1)&[units] this does not work....in the units table that provides Gallons as a selection in the combo field, Gallons has a key value of 5.....thus, when i run the query using the above code i get 10 5 - where 10 is the amount the amount and 5 is the key from the combo box...
i've tried bringing in the units table but then i get a type mismatch....how can i concatenate the two fields and show the proper units? this has to be simple but i cannot get it to work... :mad:
Hi guys, I want to return all the records which contain information under a particular column heading, hence the statement thats supposed to return all tables where Sector colum is not empty. I am new to SQL and Access so not sure why this simple query isn't working. It is a subform and displays the results in the "details" section of the form below the controls.
I think it could be something to do with the fact that its a subform, but Im not sure about this.
Me.RecordSource = "SELECT * FROM [tblRecordInfo] WHERE Sector <> "" "
any ideas guys? any assistance is greatly appreciated
I have a six table database and have a query to show all records,(at the moment) but although i have put 3 records in for testing it only shows the first record. Any help gratefully recieved i'm pulling hair out.:mad:
I have a query that filters two tables. 1) Status 2) Name
The status is 1,2,3,4,5 from an option group on my form.
In the query I have <>3 for the status, whereby I only want records that are status 1,2,3,& 5.
When I run the query with all names it works perfectly, however I am trying to run the query for only a select few names versus all of them.
The problem is I do not know how to select only a few names versus all of the names and make it work. When I try to add names i.e "Doe, John" my Status pulls all records including option 3.
Can anyone help? I do not even know where to start seaching.
Tasklist.RowSource = "SELECT [Tasks].Staff_Name, [Tasks].Project_Title, [Tasks].Percentage_Complete FROM [Tasks] WHERE [Tasks].Date_Allocated < aa ORDER BY [Tasks].Staff_Name;"
how can i make it look the the data i put in "aa" rather than prompt a msg box asking for "aa"?
Using a toggle box to ask the following question, i have data that contains either OPEN or CLOSED against each record. I tried using the following in the criteria for the specific data to either select all the OPEN records when the box is clicked and i would like to select all records OPEN and CLOSED when it is nto clicked
I've done this tons of times, so I don't understand what's happening... The title says it all: when I update the ID of one record of the main table, the referenced records on related tables won't update even though they have a relationship between them with the option "Cascade update" clicked.
In the attached database, the main table "Expedientes" is related to table "Actuaciones".
I have an Access 2010 database with two tables and two forms. The tables are Organizations and People. Similarly, the forms are Organizations Entry Form and PeopleEntryForm. The People are linked to the Organizations table. Several people can be linked to the same organization.On my Organizations EntryForm, I created a command button to duplicate a record using the wizard. It works fine.
I did exactly the same thing on the PeopleEntryForm, but instead of copying the record, it creates a new blank record. I don't get any error messages. Is my problem due to the fact that the People table is linked to the Organizations table?
I posted a thread on here a few weeks ago about dynamic queries. I was recommended to use Query By Form. So I went to the Microsoft website, followed the instructions, but now it's not working. The query is returning ALL of the table records, no matter how many fields I fill in (or what I fill them in with). I think something may be wrong with the Query criteria, but I typed it just like the site said. If anyone has experience with this, any ideas what I'm doing wrong?
Form has 15 fields (all are related to a field in the table). 3 are combo boxes, the others are textboxes.
Here is the directions I used: http://support.microsoft.com/kb/209645/en-us
I have document management system for 2 projects in one db. I have a login form where user has to select the project id thru a combobox. And I have all the queries based on this combobox to display results in form or report. But after login and selecting the project, login form closes and main form opens to display data pertaining to that project. But it does not work, the moment we click close to open main form again query method apears displaying the same string :[Forms]![frmLogon]![Project]. This happens for all forms, reports. I cant't figure this out. Can somebody please help me?
I have a form with a list box. This list box has a row source that I've set as a query for five different fields with a where clause. This where clause should pick up a value that is already within the form. And this is where I think it's going wrong, because if returns no results, but if I set it to point at the same value from another form (previous to this one, it does work). So there is something about the order or something so that this variable isn't passed to my listbox when it executes.
So, my list box has: select ID, title from table where ID = [Forms]![CurrentFormName]![ID]
and it doesn't work.However if I add a text field and set that to point at =[ID] then this does display the ID. And if I amend my query to point at this text field using the same convention above, that doesn't work either.
I presume I am mis-referencing, or there is something in the order that the listbox loads and it does this before the ID is set?
I have witten a code in the close event of a "Primary" form that would update a Combo boxe on a "secondary" form only if the "secondary" form is open. ie:
Private Sub Form_Close() If Forms!frmEnquiry.Open Then Forms!frmEnquiry!CboCustomer.Requery Else DoCmd.Close End If End Sub
This code keeps giving me an error, is anybody has got any idea why? Thanks in advance.
I have a combo box on my form that passes criteria to a simple select query. There are four possible selections to make from the combo box. For some reason, when I select the first option on the list the query runs perfectly. However, if I select the second, third or fourth option from the combo box, the query returns no records, even though I know there are records in my table which should be returned.
I have a database in Microsoft access 2010. The database has a table that stores prospective customer records, and a form that is used to input a search criteria(s) via textboxes, which then queries prospective customers table and returns the records that contain the inputted search criteria(s).
An Example of Textboxes values on the search criteria form: Textbox - name: bob Textbox - address: Left blank Textbox - category: car,boat,truck
I Have tried creating a query with the following
field: name criteria: like “*” & name & “*” field: address criteria: like “*” & address & “*” field: category criteria: like “*” & category & “*”
SQL code: SELECT customerName ,address,category FROM prospectiveCustomers WHERE customerName LIKE “*” & name & “*” AND address LIKE “*” & address& “*” AND category LIKE “*” & category& “*”;
That works, but only for one value in a textbox. Once there is more than one value in a textbox (e.g name: bob,smith), the query returns no records.
I have also tried splitting the values using the comma as a delimmter, then inserting the values into a new table. That is fine until one of the search criteria textboxes has been left blank. So the query I created will run, but returns no records.
SQL CODE: SELECT prospectiveCustomers.name, prospectiveCustomers.address,prospectiveCustomers. category FROM prospectiveCustomers, [SearchCriteria-name], [SearchCriteria-address],[SearchCriteria-category] WHERE prospectiveCustomers.name Like [SearchCriteria-name].name AND prospectiveCustomers.address LIKE [SearchCriteria-address].address AND prospectiveCustomers.category LIKE [SearchCriteria-address].category;
Attached I have a database that I've been working on which has a form called "frmCriteriaSearch". It is based off of the qryCriteriaListBoxUpdate query. I am trying to get the listbox in the second tab of the results section to work. It queries fine for the checkboxes, but I cannot get the comboboxes to affect the query (unless a checkbox has already been selected)
hey, i have a form that keeps a record of my telephone enquieries at work..
i want to place a button on this form so that, whenever i have successfully dealt with a call, i can click this button and the record will go to a NEW "Logged Calls" form...
how can i achieve this? p.s i am very new to programming etc...
Hi there, I have a really simple question. I have a field in a table that contains comments (text format). I want to run a query where I can get only the records that contain the word "high" in the comments. There may be some typos so I would like records returned that also contain something like "high". High is not the only word in the comments.
ItemType is a list of items (Table, Desk, Bookshelf, Chair) Style is a type of style for the item (Circular table, Radial Desk)
I want to create the Items.Style field based upon a query of the StyleTypes. So if a user types "Desk" in Items.ItemType then the Items.Style field will be limited to only those Styles which match that selected item within the StyleTypes table.
Think thats clear enough, but my attempts have all failed, hope you guys can give me a push in the right direction, thank you!
I have very little knowledge of databases and even less about writing queries.
The problem: I have a database that lists cities (such as Paris, London, New York etc) as rows and employment status (Full-time, Part-time, Unemployed etc) as columns. I need to go through each city and record which employment status is greatest (for each city) and present it in a new column. I can do this manually but Im sure a query can be created to automate the process.
Hope that all made sense. Can anyone suggest ideas on where to start?
hi have just designed a rather simple music database for my dad to use at home as he has large collection. have a table with the heading"artist" and another one with "album" ...my problem is that on the table there maybe 1 or more instances with the same artist but with different albums...when i run a simple query for ..say artists starting with the letter"a" i may get about 10 cases of the same artist appearing in my query when all i want is one...(depending on if i may put in say one artist like abba having 10 albums etc)...i am entering each artist with the album each time so i may enter the artist in say 10 times....depending on how many albums etc
if you understand all that...i would be grateful if someone could help me with a simple query alan
I have a query that returns the uncompleted jobs from a single table ( its a calls database) all i need is query that returns the amount of uncompleted jobs onto the switchboard I.E whatshername has X amount of uncompleted jobs , i have done a search and most of the solutions are very complicated for what i want to do .....anyone any ideas ?? pls
SQL and Access are both new to me. I have purchased some books (which are still in the mail), and have gone through this forum (which seems to be a little more advanced for me at this moment).
I have a database that contains Business_Unit (Store Numbers), Post_Date (Last Date of Inventory), and other misc. stuff. Anyways, My goal is to pull the latest date of inventory for each individual store before the last ninety days. What I have so far:
SELECT DISTINCT informix_shrink_head.business_unit, informix_shrink_head.counting_event_id, informix_shrink_head.post_date, informix_shrink_head.delta_cost, informix_shrink_head.delta_count, informix_shrink_head.count_reason_cd, pcw_loc_master.closed FROM informix_shrink_head, pcw_loc_master WHERE (((informix_shrink_head.post_date)<=Date()-90) AND ((pcw_loc_master.closed) Is Null)) ORDER BY informix_shrink_head.business_unit;
However, I get the same store multiple times and for multiple post dates. I do not even know if this can be done in one simple swoop, or if I need to create another table and re-query that? Any assistance or comments would be much appreciated.
I have a database that collects information on products when engineers return them, what I need to do is when they have submitted the form, email it to 3 people so that the paperwork can be raised.
I understand that I will need to create a query to display just the last record and then email it.
So the idea is when a record is created and the engineer clicks submit the last record then gets emailed to the three people.
Please be gental with me im still quite new to all this.
How do i create a query that just displays the last record?:confused: