Query Or Query Builder

Feb 7, 2006

Which has higher performance at run time, saved queries or using query builder on a form?

View Replies


ADVERTISEMENT

Error In Query In Expression Builder...

Sep 21, 2006

I need to implement the following logic in a report column:

IF hist_mis_cds!typgess = "", then calculated field= ""
ELSE
IF hist_mis_cds!typgess <> hist_code_translation! src_code_desc
then calculated field= "X"
ELSE calculated field= ""

I have implemented the following query in Expression Builder for the calculated field:

=IIf(HIST_MIS_CDS!TYPGESS="","",IIf(HIST_MIS_CDS!T YPGESS<>HIST_CODE_TRANSLATION!SRC_CODE_DESC,"X","" ))

When I click on Form View, I get "#Name?" in the calculated field.

Any ideas? Thanks.

View 10 Replies View Related

Error In Query In Expression Builder...

Sep 21, 2006

I need to implement the following logic in a report column:

IF hist_mis_cds!typgess = "", then calculated field= ""
ELSE
IF hist_mis_cds!typgess <> hist_code_translation! src_code_desc
then calculated field= "X"
ELSE calculated field= ""

I have implemented the following query in Expression Builder for the calculated field:

=IIf(HIST_MIS_CDS!TYPGESS="","",IIf(HIST_MIS_CDS!T YPGESS<>HIST_CODE_TRANSLATION!SRC_CODE_DESC,"X","" ))

When I click on Form View, I get "#Name?" in the calculated field.

Any ideas? Thanks.

View 12 Replies View Related

Query Fields Not Showing In Expression Builder Or Elsewhere

Mar 14, 2008

In Expression Builder and other areas of Access where the fields of a query show, my fields are not showing anymore for any of my queries. Does anyone have a solution for this?

Thanks.

View 3 Replies View Related

Extra Lines Appearing In Query Builder!

Jul 1, 2006

Can anyone help please?I have a search form that passes 4 parameterers to a query. In the query builder it reads:Like [FORMS].[frmCourseSearch].[txtCourse] & "*" >=[FORMS].[frmCourseSearch].[txtStartDate]<=[FORMS].[frmCourseSearch].[txtEndDate][FORMS].[frmCourseSearch].[txtCourseID]This works fine. But I also want it to search on only 1 or 2 parameters and set the rest to Null so I have used this statement for each one. Like [FORMS].[frmCourseSearch].[txtCourse] & "*" OR Like [FORMS].[frmCourseSearch].[txtCourse] & "*" Is Null This again works ok and I can search on any parameter. However, every time I enter data into the search form and run the query it repeats the query string in the query builder. i.eLike [FORMS].[frmCourseSearch].[txtCourse] & "*"Like [FORMS].[frmCourseSearch].[txtCourse] & "*"Like [FORMS].[frmCourseSearch].[txtCourse] & "*"etc...It does this with all 4 parameters and it's starting to look very messy. The SQL view is the same with a new repeated line added each time I run the query.How do I stop this happening? Thanks in advance.

View 1 Replies View Related

Can A Button On A Form Open The Query Builder?

Oct 2, 2004

Hi

I'm not sure if this is a dumb question or not but is it possible for me to have a button on a form that will open the Query Builder?

I have a form that has 3 buttons on it - 1 to access records, 1 to access reports and another which I would like to open the Query Builder when clicked. The database will be used by beginners so I've hidden the design view button and also the database window which appears at startup. All that appears when I open my database is the 3-button form which is what I want.

I thought maybe I could save a blank query and then create a macro to open that whenever the button was clicked and stipulate in the macro to change the view to design view but that didn't work.

Thanks to any help or advice anyone can give and sorry if it turns out to be a really stupid simple solution I've missed (I'm good at that!)

View 1 Replies View Related

Queries :: How To Use OR Condition In Query Builder Wizard

Aug 19, 2014

I have to three fields in my query wizard, lets call them A and B and C. The condition for the query is either A or B is Null and C is Null. Im not sure how to do this though becuase A, B and C are different fields. I wrote

Code:
Is Null

.

under the criteria of A and B and C, but this specifies that A,b and C is Null, how can I make it so that C must be Null and either A or B or Both.

View 1 Replies View Related

Queries :: Combining Data In Access Query Using Builder Function

May 13, 2014

I have a table in Access 2010 and in one field i have multiple records of the same data as in the next field it has unique data for example:

NameColour
CarBlue
CarGreen
CarYellow
BusOrange
BusPurple
BusRed

I am trying to run a query which will effectively group up the "Name" field and combine the "colour" field against the name using a ";". so it would look like this:

NameColour
CarBlue;Green;Yellow

How i would do this.

View 5 Replies View Related

Help With Expression Builder

Jan 9, 2006

When I enter a date into the [Return Text Date] field on my table and then select a value from the [Upgrade Fee] combo box followed by a selection from the [Upgrade Investment Class] combo box i want the value (or Date) in my Eligibility Date field to be amended by the given amount.

I have an expression, listed below, that i want to repeat (copy + Paste would be good) and amend the values. I have entered 2 and that seems to be all it will allow. I want to have 30 possible permutations to the fields 0 - 300 (in 50 intervals) by 5 (1,2,3,4 & 5)

The Code works below but I cant have anymore code in the expression builder

IDEAS please people.......

=IIf([Upgrade Fee]=0 And [Upgrade Investment Class]=1,[Return Text Date]+180,IIf([Upgrade Fee]=0 And [Upgrade Investment Class]=2,[Return Text Date]+150,""))IIf([Upgrade Fee]=0 And [Upgrade Investment Class]=3,[Return Text Date]+120,IIf([Upgrade Fee]=0 And [Upgrade Investment Class]=4,[Return Text Date]+90,""))

View 14 Replies View Related

Expression Builder

Jan 16, 2007

Hi!

I need some help.

I want to create a formula (using expression builder or something else) who will separate the word id=276616652 lang=FR temp=80 in a new column (for each word)

Id=276616652&Lang=FR&Client=Diesel649&Temp=80

by the way, im using this in a log database

View 3 Replies View Related

Help Need For Expressions Builder

Aug 1, 2006

Hi experts

I have some problems consists of using Conditions.
I have 4 tables in Access:
tbl1_School names, addresses, ID_Number etc..
tbl2_ School features with Number of Clesses, Number of Students, total Area etc.
tbl3_teaching stuff with names, occcupations, Ages ets. and
tbl4_nonteaching personal with names, occupations. ages, etc.

References is ID_Number of schools
I make Query with relations, but do know how to build Expressions Builder for this:
Question 1.
a)If school have between 300&500 Students there are ig.18 teachers,
b)if schools have between 500&800 Students there are ig.25 teachers and until 1500 Students there are ig. 50 teachers.
Question 2.
c)if school have area until 400 m^2 there are needed ig. 8 nonteaching personel,
d)if school have from 400 till 600 m^2 there are needed ig. 15 nonteaching personel.

Numbers I specified like examples ig. were prescribed bye regulation.

If someone want to help me how can I use Expression Builder or VBA Code it would be appreciated.

It means I should use Condition Commands.

Thank You for help.

View 6 Replies View Related

Expression Builder HELP

Sep 23, 2006

I've built a query against a form and included a calculation to give me the average sum which looks like this :

=Sum([data field])/31*12.5

This work fine however, what is the best way to overcome the different number of days in the month ie; 28, 30 and 31? I've looked at the Expression Builder but getting lost :rolleyes:

Regards

Richard

View 2 Replies View Related

Expression Builder

Feb 10, 2006

Hi all,
i have a field that uses Date/Time as the data type and what i want to do is to create records that only have the time between the hours of 9:00am and 9:15pm.... i think i need to use the expression builder for this, but im not really sure on the expression to use.. any ideas ???:confused:

View 6 Replies View Related

Expression Builder

Sep 20, 2006

Hi,
I am fairly new to Microsoft Access and can't get to grips with the expression builder. I have several fields where I need to add validation rules and no matter what I try I can't seem to get it right. E.g I'm trying to set a validatio rule for only allowing locations into a certain field. Could someone please give me some help or point me in the direction of a good guide?

View 1 Replies View Related

Expression/Code Builder...

Mar 24, 2008

Hi, i am making a stock control program in Access. I have designed several tables, forms and queries etc. but have come stuck at the point where i want to create a button so when i click it, it automatically changes the stock level of all the products that are low in stock, to their "target stock level".

I am confused about how to do this. I tried making a button and going into the expression builder and putting:

=[Product Stock Level]=([Product Target Stock]-[Product Stock Level])+[Product Stock Level]

This would basically change the stock level to the target stock level. But when i press the button, nothing happens.

Any help on this matter is greatly appreciated.

Thanks alot.

View 9 Replies View Related

Expression Builder - Help Needed.

Oct 26, 2004

Im looking for a guide to teach myself how to use the expression builder.

I know how to write constraints in SQL, so with a bit of luck it will be similar. :P

A list of every command you can use might be just as good as a tutorial.

Can anyone point me in the right direction?

Thanks.

View 2 Replies View Related

Expression Builder IIF Problem.

Mar 7, 2007

Hi,

I am trying to write an expression in my query which, given a condition, it uses the following criteria:
"Carmarthenshire" Or "Ceredigion" Or "Neath Port Talbot" Or "Pembrokeshire" Or "Swansea"

So far I have come up with this:
IIf([Forms]![Main Menu]![cboRegion]="West Wales","Carmarthenshire" Or "Ceredigion" Or "Neath Port Talbot" Or "Pembrokeshire" Or "Swansea")

However the Query builder complains the expression is incorrect or too complex etc. etc...

If I simplify it to this:
IIf([Forms]![Main Menu]![cboRegion]="West Wales","Carmarthenshire")
it works fine but unfortunately this isn't what I need.

Any help much appreciated,

Matt.

View 11 Replies View Related

Expression Builder IIF Issue

Mar 28, 2007

Hi all,

Should you write an expression the criteria field in a query and use IIF, an interesting little bug appears that I have not managed to get around. Should you want the expression to return a range as the criteria (i.e. Between ... And ... ) it can't do it because IIF tries to evaluate the range before it passes the result back to the query. I need it to actually pass the Between And to the query to use as it's criteria. It can't do this, so it passes back a null and of course the query fails to produce any meaningful result.

I need to do this as I have two date text boxes in a form so that people can search through specific dates, but in the table these date fields can be blank. (Basically it's a Date Completed field, so if the job hasn't been completed, the date is left as Null) So i need users to be able to leave both text boxes blank so that the resulting query will display the Null values as well. If they leave one blank, it auto sets itself to the a minimum/maximum date. When both boxes are blank i need to return nothing so the criteria is effectively blank or = Is Null And Is Not Null to display all records.

Example of WIP

IIf(IsNull([Forms]![frmListImgChng]![txtDateComp1])=True And IsNull([Forms]![frmListImgChng]![txtDateComp2])=True,#15/01/2007#,IIf(IsNull([Forms]![frmListImgChng]![txtDateComp1])=True,Between #01/01/2007# And #01/04/2007#,IIf(IsNull([Forms]![frmListImgChng]![txtDateComp2])=True,Between [Forms]![frmListImgChng]![txtDateComp2] And #31/12/2030#,Between [Forms]![frmListImgChng]![txtDateComp1] And [Forms]![frmListImgChng]![txtDateComp2])))

The red bits of code are test values. The first one passes back to the query as it is not a range, the second does not as it is.

Cheers,

Matt

View 6 Replies View Related

IIf And Isnull In Expression Builder

Mar 19, 2008

Basically i have a drop down that i want controlling the Criteria for each field in my query to have an advanced search. If i leave a field blank the query comes up with nothing so i tried this:IIf(IsNull([Forms]![Inventory Report Search]![Model]),Is Null,[Forms]![Inventory Report Search]![Model])this is not working. it is still returning the query blank. if i put valid critera in the dropdown it comes back Fine.how do i make is so if a field is blank it will return it as null or not even there.Note: also tried this;Forms]![Inventory Report Search]![Model] Or Forms]![Inventory Report Search]![Model] Is Nullworks, But comes back as too complex after a few searches and when i open the query there is a million or's in there. so that wont work.

View 3 Replies View Related

Locking Code Builder

Sep 17, 2004

I would like to how to prevent other user from getting into my visual basic program and editing it in my access file.
I had come across some access programs that it allow user to run it but when trying to edit into its VB, it denied the user.
Would appreciate someone could guide on this. Thanks.

View 1 Replies View Related

Expression Builder Tutorial Or FAQ?

Oct 13, 2006

Now I have been working for a few months with ACCESS but one thing that keeps giving me trouble and that is the "Expression Builder". I look at the Microsoft Help and it is not good in explaining this part of ACCESS. I have Access books and they are not good with explaining this aspect of Acess. Is there anyone with a good source to point me in the direction to learning the Expression Builder better then I know now?

View 1 Replies View Related

New Line Using Expression Builder

Feb 11, 2008

This seems so simple and it probably is, I've probably been staring at my database for too long doing too many other things but here goes:

I want to create thank you letters for a list of people. I've made my query and gotten all their info together but now I can't make a report for the letter. I can make my text box but after that nothing seems to work out right. I'm not that good with VB code so I have been using Expression Builder which follows logic statements and not real code. I can't get even the address showing in one text box with 3 lines. Once I get that far I can get the remainder of my letter created because its all the same thing but I really need some help to get beyone the address!

Thanks

View 7 Replies View Related

Functions In Queries / Expression Builder

Dec 3, 2004

Hi, I need some help using functions in queries. I can calculate simple arithmetic in calculated fields, but fail when using functions. For example I have attached a doc file showing a query. One table displays record ids, the other four have data for consecutive dates for each record. I cannot make the query calculate the standard deviation of the data for each record. What expression would I use, I know it is stdevp but when i try and create the expression i get error messages galore.

thanks

View 2 Replies View Related

Expression Builder Or Conditional Formating

May 30, 2005

Hi, can anyone help me? I'm using an access database to collect information and pull reports. One of the fields in one of the tables contains dates and time. In my query I would like to be able to state that records created after 17:00 and before 08:00 of the next day, get counted in next day reports. (i.e. Record 1 created 26.05.05 at 18:01 would show in my report as coming in on 27.05.05 at 08:00 am). Thanks,

View 5 Replies View Related

Help Needed With The IIf Expession In The Expression Builder

Jan 11, 2006

Hi all!

I need to write an expession in the Expression Builder but I cant seem to get it correct. Here is what I want to do:

I have 2 forms and 1 query.

I want the criteria for my query to take the data from the loaded form, ie if form1 is loaded then take the value in field1/form1 as criteria, otherwise, if form2 is loaded then take the value in field2/form2 as criteria.

Form1 and form2 are never loaded at the same time.

Can someone give me a suggestion? Thanx for your help

View 13 Replies View Related

Queries :: Using OnClick In Expression Builder?

Jan 27, 2015

I have query that filters my list in Access. The list can be filtered in different ways(like using a combobox). This is the criteria of the query for the field Title of the table Book:

Code:
Like IIf([Forms]![frmName]![cmbSearch].[OnClick];"*" & [Forms]![frmName]![txtSearchBar] & "*"; [Book]![Title])

What I want is when the cmbSearch is clicked, the list must show the Tiltes where the title of the book contains the words of the search bar. When its not clicked on that button, the list must show all the titles.

Here is the SQL of the query:

Code:
SELECT Book.ID, Book.Title FROM Book
WHERE (((Book.Title) Like IIf([Forms]![frmName]![cmbSearch].[OnClick],"*" & [Forms]![frmName]![txtSearchBar] & "*", [Book]![Title]))

The problem is the list filters whether I click on a different cmdButton or an optionButton. I dont know why [cmbSearch].[OnClick] doesnt work.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved