I have two questions about entering Criteria in the query dialog box.
1. I know how to have the program ask the user what information they want to look at. For example if I am advertising coats and I have different colored coats like, red, blue., green. etc. I can enter [Enter the colored coat you want to view] How do I tell the user to hit Enter if they want to view all the coats.
2. Referring back to the coat example. If I used an ID to number each coat, I have a customer email me asking for information about five ID's that are not in consecutive order, how do I run a query in return a report with the information of just the ID's that I want to send to the customer.
Hi, I wanted to know if it is possible to combine multiple criteria in a single dialog box. Let me explain:
I have a query for which two fields need criteria entered by the user. In design view under criteria I have entered this type of expession Code:[enter criteria] for both my fields. Of course when I run the query I first get prompted for the first criteria and then once I click OK I get prompted for the second...
What I would like is to have a single dialog box with both criteria on 2 lines...
Ok, here's the scoop. I have a tournament / player score tracking database that we are developing.
1. I have a form that I would like to use to select a table number. I use a combo box to select this table number. This part is easy.
2. Once I have selected the table number, I would like to have two sets of fields automatically filled with information from two different queries (ie: player #1 and player #2). Each set of fields will include the player name and the appropriate score fields for the event. The majority of the time the data that will show up will only be the player name since we will be receiving scores and entering the information as it comes in. However, this same form could be used to edit player scores.
3. I would like to be able to tab from one field to the next when entering the information. After all of the information is entered, I would like to then hit a button that will write the information back to the two queries.
The problem that I seem to have is trying to enter information from two queries on the same form. Alas, I have been experimenting with unbound forms, subforms and unbound text fields, but have not been able to get anything to work. Would anyone have some suggestions? Any help is greatly appreciated.
I have a macro setup that deletes all the records in 2 different tables, then using about 8 queries, appends several records to the two tables where data was deleted. When these macros run, several Yes/No/Cancel dialog boxes come up for each query, first asking you if you are sure you want to do this, that it is going to change data in my table, and then second telling me how many records it's going to append or delete.
Is there a way to make it automatically run Yes to all of these dialog boxes? That would really help out a whole lot. Of instead of that, but maybe some sort of VB code that could do all the deleting and appending without the need of the Macros, and that doesn't require user intervention. I have my Macro's setup on the "On Click" event in a form, so using VB would be no problem at all.
I have a process that lifts a highlighted date from a List Box and puts it in the Criteria of a query. The process manages to move the numbers from one place to another, but ends up giving me a data mismatch in the query. The process is as follows
Private Sub Command8_Click() 'Set it all up for Panel Meeting selection Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim varItem As Variant Dim strCriteria As String
[Code] ....
The Immediate debug shows...
SELECT * FROM tbl_Panel_Meeting_Dates WHERE tbl_Panel_Meeting_Dates.PanelDates IN ( '1/07/2013' );
I'm pretty sure (althiough always stand to be corrected!) that I need it to come out as
I have 3 cross tab queries that are completely identical with the exception of the field that they pivot. Each field is searching for the same values just in different columns, with the end goal being to get the sum of the values for each pivoted column. I'm wondering rather than having 3 almost identical queries is there a way to use a crosstab to sum the values from each of the three fields rather that having 3 queries which then have to be aggregated in a fourth?
QUERY1
Code: TRANSFORM IIf(Count(PT_LEVEL.UNIT) Is Null,0,Count(PT_LEVEL.UNIT)) AS CountOfUNIT SELECT PT_LEVEL.INF_YEAR, PT_LEVEL.INF_MONTH, PT_LEVEL.UNIT
Hi All. I created query with dialog box in Access : SELECT (Format([Date_P],"mmm yyyy")) AS [Date_P], Result, Count([Date_P]) AS Pos FROM ABC GROUP BY (Format([Date_P],"mmm yyyy")), Result, Format([Date_PAP],"yyyy") HAVING Result<>"neg" AND Count(Date_P>0 AND (Format([Date_P],"yyyy")=[Please, enter year (yyyy):]); How to convert that query to veiw MS SQL? Thank.
I guess this is a fairly basic question but bear with me.
As with all newbies 'how can I' type questions come thick and fast and this one involves using Criteria in a Query. I am comfortable with the concept of prompting for a variable within a query using the square brackets ie.[Enter Post Town]. This of course relies on the person entering a valid value or spelling it right.
So I thought, what if I make Post Town a Combo box (I am working with a small sub set of places). Which then brings me to my question.
Can I create a query (which runs a report) that when activated will prompt for variable (in my case Town) and display the drop down list ?
I Currently have a query that has various information on it. WHen i click to open the query, It states to "enter line number", where i can enter a line (e.g. line43). If entered EXACTLY as it is found in the table where i took the information from, the records will show. However if i type in 43, or L43 or line43/44, nothing will show up. How can i make it so that there are multiple ways to show records, when i enter different information? (There are about 8 different lines).
Thanks to anybody who takes the time to help me solve this problem.
I am just trying to write a query by a code of table i would like to pick up any record with id number betwee 1-99 and 200-299 i try typing them in manually but access wouldn't cope
any idea of how i can achieve it please Many Many Thanks Si
How do I get rid of the start up dialog? The boxes which pop up and say "Security warning, Unsafe expressions not blocked" and the other that says "warning this document may not be safe blah blah blah".
Hi, I have a report and I am doing some SQL stuff at the back end on the report open. This takes a little time and I want to show the user that its working and I want to prevent him from double clicking the report again. So is there any way to show a progress dialog or something so that the user knows that the list is being built? Thanks in advance! Adwait
I am in the process of creating d/base of early settlers for our local museum. The Fields need to have reference to one or more files or programs outside of Access, e.g. Legacy, Word, photo files, d/bases of electoral rolls, etc. The apparent easy solution was to attach these sources and I also got a handy Attachments dialog box that showed me the list of attachments for a every person or place. However, after entering only 10 names and attachments, the file size had grown to nearly 8Mb - obviously impracticable if the d/base is to contain over 2,000 names.
So, I switched to using Hyperlinks which cut the file size by 90% but now I have another problem: Hyperlinks only lead to one item, e.g. a photo, whereas the person concerned may have several photos and several other references. This would necessitate creating multiple Fields.
Is there a way to create a Dialog box (similar to the Attachments box) that would show me a list of the Hyperlinks for a particluar person?
Is there a way to produce one query that will produce several results that display in a report that is generated from a button? The only difference is the criteria.
EX: SELECT tblDownTime.dtDate, tblLine.lineName, Sum(tblDownTime.dtDowntime) AS [Total Time Down] FROM tblMachCent INNER JOIN (tblLine INNER JOIN (tblCategory INNER JOIN tblDownTime ON tblCategory.catID = tblDownTime.catID) ON tblLine.lineID = tblDownTime.lineID) ON tblMachCent.machID = tblDownTime.machID WHERE (tblDownTime.dtDate) Between [Forms]![frmDTGraphs]! And [Forms]![frmDTGraphs]![end])) GROUP BY tblDownTime.dtDate, tblLine.lineName HAVING (tblLine.lineName)="[B]name of line");
criteria being name of line. Choices being line 1 or line 2
What I am looking for is one query to somehow generate the info on the two different lines in two different reports.
Is there a way or do I actually have to write the different reports?
I am trying to create a crosstab query, but can get it right.
Table1 = input Table __________________________________________________ ___________ name StartDate date Present A 1201 1201 P B 1202 1205 P C 1203 1206 P D 1204 1207 P E 1206 1209 P
Can get this result with Crosstab Query;
TRANSFORM NZ(First([Table1].[Present]),"a") AS FirstOfPresent SELECT Table1.name, Table1.StartDate FROM Table1 GROUP BY Table1.name, Table1.StartDate PIVOT Table1.date;
__________________________________________________ ____________ name StartDate 1201 1205 1206 1207 1209 A1201 P a a a a B 1202 a P a a a C 1203 a a P a a D 1204 a a a P a E 1206 a a a a P
But am looking to add NA for StartDate > Header Date(1201,1205,1206,1207,1209). See below. Does anyone have a solution or an alternate method
Looking to get this type of results __________________________________________________ ____________ nameStartDate12011205120612071209 A1201 Paaaa B1202 NAPaaa C1203 NAaPaa D1204 NAaaPa E1206 NANAaaP
Ive had a quick look at other threads to see if this question has been asked already, so hopefully Im not repeating a previous question!
I am completely new to Access but have been asked to perform multi-criteria queries across multiple tables. I realise it would be easier to just put all the information into one table, but if anyone could explain how to do the above I would be very grateful.
I have a table that I want to append to another table, but I do not want to duplicate records if the check number is already in the table I am appending to. I have tried <>[deposit].[check_number] or not like [deposit].[check_number] or not [deposit].[check_number] but I always get prompted to enter a check number... therefore the criteria statement not working. do not know what I am doing wrong.
I have multiple queries pulling data from multiple data tables but are all common by a date that I have to enter in the criteria field for each query each time I need to change the date. Is there a way for the criteria field to read data (the date I want) from somewhere so I only have to change the date in one place and is read into each query where specified? I'm having to go into many queries to change the date criteria which I change to the same date for all queries - I'd like to do it once and have the queries read that date.
I'm a little new to Access but I'm trying to create an IIf Expression:
iif ( condition, value_if_true, value_if_false )
Mine is: Au_ppb: IIf([Element]="Au" And [Units]="ppb",[Result],Null)
I need to have three criteria's (each looking into a different column). I can get two criterias but not three:
[Element]="Au" And [Units]="ppb"
When I add in the third (And [Priority]="12") it doesn't work .
Also, I need to have about 6 columns with similar IIF statements in the one query in my query and if a row has Null for all then I don't want it visible however if I make the Criteria "Is not Null" on one column or on all it comes up with no results.
I'm trying to generate a list of employees who haven't had a review since Dec 2013.I'm using this expression in my query:
Last review: DLast("[ReviewDate]","[Tbl_OutcomeHistory]")
which brings up the last date the employee had a review.(I tried using DMax but it didn't seem to like dates?)How do I get it to just show those who haven't had a review since 1st Dec 2014. I thought I could use "<01/12/2014" in the criteria but it returns no values. I've tried to drop the date into the expression but that returns no values.
I used a DCount however this does not separate the employees. Currently using Count Of Visits: DCount("[Duration]","Test Query","[Duration]<20 AND [Employee ID] = [Employee ID]")
In an Access 2010 query is it possible to set a criteria on a field (Results), that If it is "Negative" then another field (Variants) has the text "None Detected". Or is it easier to do that in the Variants field?