Queries :: Change Format On Query Criteria?
Apr 5, 2013
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?
View Replies
ADVERTISEMENT
Sep 23, 2013
I'm having a format problem. I have a query (Q1) that, among other things format a date field as YYYYMM (Field1).
I have a second query (Q2) whose data source is Q1.
In Q2 I need to link Q1 to a table but Field1 is being reformatted as text (confirmed by running a make table query).
I want Field1 to be Number format to eliminate a mismatch error.
I know how to change the format of a field in a table using VBA but I cant seem to find a way of changing the format within a query.
View 2 Replies
View Related
Aug 14, 2015
Is it possible to run a query and have the background color of the query field be highlighted if a certain criteria is met?
I'd like to use the expresion builder if possible.
For example if the values in field A and field B do not match, then field C should be a yellow background.
If this is possible, how is it done?
View 1 Replies
View Related
May 21, 2014
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.
View 2 Replies
View Related
Sep 9, 2014
In my query I have a date field and it is half UK british and half US. I have my regional date set to UK on my laptop.
how to change it to same date? I don't mind either, I just want it to be consistent.
View 14 Replies
View Related
Aug 5, 2013
I am struggling to change the format of 2013-07-29 11:33:03.6160000 to show dd/mm/yyyy
View 4 Replies
View Related
Mar 19, 2012
in a query, I would like to capture data that is in the following format:
123456 (6 digits) AND
A12345 (1 letter and 5 digits) AND
AB1234 (2 letts and 5 digits)
The letter could only be at the beginning of the abbreviation.
View 1 Replies
View Related
Aug 9, 2005
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! :(
View 8 Replies
View Related
Jan 18, 2006
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?
Thanks
Gunner...:confused:
View 2 Replies
View Related
Jul 6, 2006
Hi,
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).
Any ideas?
Regards,
View 2 Replies
View Related
Jun 24, 2005
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?
Thanks in advance!
View 3 Replies
View Related
Feb 14, 2006
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.
Suggestions welcomed.
Gunner...:confused:
View 8 Replies
View Related
Jan 13, 2007
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.
Any help appreciated.
View 2 Replies
View Related
Mar 26, 2008
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.
Is this possible?
Thanks
View 1 Replies
View Related
Oct 22, 2013
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.
View 2 Replies
View Related
Jul 17, 2013
I have this query that finds people based on a given id number that they own. The ID number is in the format of (0000-0000) The tables have input masks so that when entering the ID number all the user has to worry about is entering the numbers. I have a report for that shows every customer in the database and i want to be able to copy and paste the (0000-0000) portion of the ID number but the query is only able to find customers by (00000000) format is there a way that i can get the query prompt to ignore the dash in between the numbers or would it be easier to remove the input mask and enter everything manually?
View 1 Replies
View Related
Feb 11, 2008
The DB this info is pulled from stores the NAME field in all caps.
My query returns the name like= JAMES JONES
Is there something I can do to change the name format to James Jones?
SELECT
[OPEN CASES].CASE,
[OPEN CASES].[MEMBER#],
[CLIENT TABLE 2].NAME,
[CLIENT TABLE 2].A1,
[CLIENT TABLE 2].A2,
[CLIENT TABLE 2].ADD INTO [MEMBER CASE TABLE]
FROM [CLIENT TABLE 2] INNER JOIN [OPEN CASES] ON [CLIENT TABLE 2].MEMBER = [OPEN CASES].[MEMBER#]
WHERE ((([CLIENT TABLE 2].RELATION_CODE)="C")) OR
((([CLIENT TABLE 2].RELATION_CODE)="S") AND
([CLIENT TABLE 2].MEMBER_CASE_STATUS)="A"))
ORDER BY [CLIENT TABLE 2].ADD;
View 4 Replies
View Related
Sep 6, 2013
I'm creating a query with VBA, then exporting it to Excel. I have a couple calculated date fields that are exporting in the format of dd-mmm-yy, but I want them in the mm/dd/yyyy format. In the query, they're in the proper format, but not in the export. I tried using Format([DateField],"mm/dd/yyyy"), but then they left align in the export, but are fine in the query.
View 1 Replies
View Related
Nov 11, 2014
I have unified three queries , each query has a field "date",
format is dd/mm/yyyy.
The Union select query however, displays this "date" with different format , dd/mmm/yy
How can I fetch same format in the union query ??
View 3 Replies
View Related
Feb 13, 2008
Hi, I'm newbie.
I did create LANDesk Date Control in the form but the date format shown MMDDYYYY.
I want change the date format to DDMMYYYY...how?
& how do I link the LANDesk Date Control into tables as database?
p/s - can I change font color date of "Sat" & "Sun" to red color instead? Please guide.
Thanks.:D
View 2 Replies
View Related
Oct 25, 2006
Hello. I'm triyng to change every field format in a Form each time I jump from one field to another. I want it to get grey and bold when it got the focus
I managed it with a GetFocus and Lost Focus for each field but whena form has a lot of fields it gets "a lot" of programing.
Is there a way of doing it another way, for instance On current
Thanks
View 5 Replies
View Related
Dec 6, 2004
Hi all,
I had a form with a command button which invokes email sending option to send a report..I am using code from a sample database . The code which I am using is here:-
'This will create the e-mail
DoCmd.SendObject acReport, "Rpt_Customer", "RichTextFormat(*.rtf)", "", "", , "Customer Report", "", False, ""
'Tbis explains all the section of the e-mail see SendObject in help
Rem example from help DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]
The code is working perfect and my question is that can I change the file format from RichTextFormat to word format????? I tried by chaning "WordDocument (*.doc)" but it didn't worked???? Is there any way I can change that to word format (*.doc)???? any suggestions appreciated .
thanks in advance
Thanks
View 4 Replies
View Related
Aug 7, 2013
I have a "make table" query. Inside that query there is a simple expression that divides two fields by one another to arrive at a %. Example 5/100=5%. However, the data returned is not in a % format.I know that I can go into table properties and change the fromat to "percentage", but that will only work for the current table that I have created. Once I re-run the "make table" query, I lose the change to the format, and my value again returns to a number, not a %..
Is there any way to always have a percentage returned without having to manually change the format each time that I run the query, or having to make a "delete" and "append query" ?
View 3 Replies
View Related
Sep 21, 2014
I have a table that contains information along with a field named "Date Input" and then a calculated field called "Due NLT Date". New records are appended to this table daily. The calculated "Due NLT Date" field is simply "[Date Input]+5".
In some unforeseen circumstances the "Due NLT Date" field needs to be extended to 6 or 7 days from the "Date Input". I am trying to find a way adjust the number of days using a command button/VBA getting the desired number of days either from an input box or from a txt box on a form.
I have been playing with using SQL ALTER TABLE in VBA but can't get it to work.
I'd image it would look something like this but how to write it correctly:
RunSQL ALTER TABLE "table" FIELD "field" to calculated "[Date Input]+ & input box "Enter number of days""
View 5 Replies
View Related
Dec 3, 2014
I am using an append query to move data into another database. One of the fields being imported is a date field in text form (20141201). I need it appear in the final database in text form (01/12/14) I have tried using several date conversions and cant get this work. Ideally i need the final value as a text rather than date.
View 8 Replies
View Related
Jan 10, 2014
I get a result set from a pt qry from a sql server 2008 in vba. Me.Total is an unbound field in the report foot( correct translation of german "Berichtsfu"??)
Private Sub Berichtsfu�_Print(Cancel As Integer, PrintCount As Integer)
SELECT SUM((DATEPART(hour, Calctime) * 60 + DATEPART(minute, Calctime)) * Price / 60) AS TtlPrice ...
Set rs = CurrentDb.OpenRecordset("qryPT_TtlPrice")
Me.Total = rs("TtlPrice ")
On the access report I can format me.Total as currency, decimal, integer whatever I want (unless it makes no sense exept currency) and it works.
but
SUM(((DATEPART(hour, Calctime) * 60 + DATEPART(minute, Calctime)) * Price/ 60)* (case when CompanyID=1 then 1.66 else 1 end)) AS TtlPrice
The detail should be multiplied with 1,66 when the record belongs to company 1, for all others ist remains the same. In the Management Studio the results of both looks similar, same in the debug window of VBA editor, but I cannot format the result or lets say, the formating is wrong for the second example.
Neither in VBA
Me.Total = format(rs("TtlPrice "), " 0.000,00") or
Me.Total = format(rs("TtlPrice "),"0.000,00")
nor in the report int the properties of the field I can avoid this result: in the debug window of access the result looks OK, for example 29555.670000 (don't know where all the 0 come from), which should read as 29.555,67. But on the report the result with formated curreny in field property (currency, 2 decimals) shows 29.555.670.000,00
View 5 Replies
View Related