Queries :: Format Field In SQL

Aug 28, 2013

If I'm working strictly from SQL, is there a way to format a field as currency, standard number, etc. without using the format() function? Basically the equivalent of setting the format in the property sheet in design view, without going to design view.

View Replies


ADVERTISEMENT

Queries :: Change Field Format Within A Query

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

Queries :: Format Expression Field As Currency

Jun 4, 2014

I have this expression I created and I want to know how to format it as currency. I know how to do it with a regular field but the option is not available for an expression.

The expression:

Code : Charge: IIf([Rate] Is Not Null,[Rate],"0.00")

View 1 Replies View Related

Queries :: Condition Format A Date Field

Aug 9, 2015

condition formatting a date field in access.The query used for this field produces a date or "NA" based on the formula below. so when the date shows up as "NA" then i have set the condition formatting of the cell to grey and this works works well. but when it shows up with a date it doesnt format to a grey.the formatting pane has these two expressions

1. Q_Induction_Date = "NA" then grey the cell

2. Q_Induction_Date < DATE() then grey the cell and this DOESNT work. i have also tried the function Now() and that doesnt work either.

Formula i use in the query is

Q_Induction_Date: IIf([y].[INDUCTION_NA]=-1,"NA",IIf(IsNull([induction_date]),"NA",Format([induction_date],"dd/mm/yyyy")))

View 4 Replies View Related

Queries :: Checking Format (Identity Of Field)

May 28, 2013

I've got a database with an 'address 1' field. Sometimes if it's just a number, excel formats the field as a date. Is there anything to check the field to identify any that are showing as dates as opposed to just normal fields. For example identify all customers who have some variation of dd-mm-yyyy in the address-1 field.

View 10 Replies View Related

Queries :: Changing Field Format In Append Query

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

Queries :: Format Field As Password Or Hidden Text

May 22, 2014

I have a query that I am sending as a spreadsheet to various service technicians listing parts that they need to take inventory of. Then, after they take the inventory, they send the spreadsheet back to me and I upload their counts back into my database. Right now, my query contains the Bin number, part number, part description, and a blank column for the technician's count. I have just learned, that the company does not want the Bin number to be visible in the report. In order to upload the technician counts into the database when they return the spreadsheet, I need to be able to reference the Bin number to get the count on the right line.

Is there something that I can do so that the Bin number will be visible in the report when the database reads it, but not to the technician?

The only solution I could think of was to format the Bin Number as a password. Unfortunately, I can't get that to work in the query results. If I save the bin number as a password in the table, is there a way to make it visible on reports for internal use (so the people in headquarters who are responsible for over all inventory can still see each bin number)? I found how to hide the field in the query results. However, when I send the results to the technician, the field is not there at all.

View 5 Replies View Related

Queries :: SQL Code To Define Field Format - Mismatch

Dec 1, 2014

I have created an union query to pull together the same data from 2 ODBC tables (seperate countries).As there is a clash in the client number I have added a "N" prefix to differentiate NZ from Australia, as below:

The problem I now have is that I get type mismatch when linking to another table. How could I change the SQL below to dictate the field format to number (providing it will accept the "N" prefix) or all to text?

SELECT dbo_ClientMaster.ClientNumber, dbo_ClientMaster.Name, dbo_ClientMaster.AddressLine1, dbo_ClientMaster.AddressLine2, dbo_ClientMaster.AddressLine3, dbo_ClientMaster.AddressLine4, dbo_ClientMaster.TradeCode, dbo_ClientMaster.ReviewLimit, dbo_ClientMaster.ClientStartDate, dbo_ClientMaster.TypeOfTrade, dbo_ClientMaster.NextReviewDate, dbo_ClientMaster.LastReviewDate, dbo_ClientMaster.TerminationDate, dbo_ClientMaster.TerminationReason, dbo_ClientMaster.BankSortCode, dbo_ClientMaster.BankAccountNumber

[code]....

View 2 Replies View Related

Forms :: Assign Field With Special Format Based On Date / Time Format

Feb 17, 2014

I wanted to assign the field "Number of magazine" with special format based on date/time format but showing only year and month in the format: "yyyy-mm".

So in property of this field in format I put yyyy-mm and in input mask I type 0000-00;;-

I also created the form based on the table containing above field and I defined format and input mask for corresponding formant in the same way like at the table.

But if I try to type date for example 2014-01 in text box of the form it comes up with the full date 2014-01-01. Why does it do like this? What do I do incorrectly?

View 2 Replies View Related

Forms :: Conditional Format One Field To Alter A Second Field

Jun 26, 2015

Have a continuous form with 2 date fields in each record .

If dateField1 is empty ,Then I want a way to make DateField2 Take its Place .

I know how to make things happen with conditional formatting on one field by UsingIsNull ,I have tried sending datefield2 to back.But cant work out how to bring it to front If DateField1 IsNull.

View 3 Replies View Related

Number Format In Sql Queries

Apr 3, 2007

I was about to post a question yesterday, but I found a solution myself and would like to share it. When a new column is computed in the query, there is no way to prescribe the data format of the computed column (=field =variable). It is done automatically by access and it can go wrong. I tried to use Format() function but it changes the look but does not change the type of the column. So what you have to do is to wrap your expression in a data convertion function. I used CDBL() as a wrapper for my expression.

I consider it as a bug of Access because in my situation I had a swich() function that took only numeric fields and produced only number but the data type of the column was set to TEXT. I noticed it in the pivot table later on , when I could only use Count() as aggregate function.

Good luck! and take care of data conversion by yourself, do not let it go automatically!

P.S. If anyone knows a better way to prevent such conversion errors, be my guest!!!

By
Maxim Ivashkov
http://www.4suc6.com

View 2 Replies View Related

Format Field

Jan 25, 2008

Hi,

I have this code which makes all the data displayed on the form in this respective field capital letters e.g John will be displayed as JOHN and saved as so.

However, what i want to do is only make the first letter as John not JOHN. How can I change the code?

Me.surname_forename = UCase(Me.surname_forename)

Thanks

View 5 Replies View Related

Format Of A Field

Oct 7, 2005

I have changed the inputmask of a field based on an if statement. however i put / characters in place and it wont leave them there can anyone help.

Me.txtbox = "AAAAA/AAA/AA"

View 5 Replies View Related

Queries :: Change Date Format?

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

Queries :: How To Convert Date Format Using SQL

Oct 1, 2013

I need to convert the date format October 10th, 2013 to 10/01/2013 in a field using sql in access 2010,I know it has to be an update query but dont know how to start writing the query.

View 1 Replies View Related

Queries :: Format Does Not Carry Over From Table

Aug 8, 2014

I have an issue with queries not showing sufficient decimal points, even though the underlying table does have the formatting I desire.

If I open Table 1 directly, for Field 1 I have a value of 0.1439254445378153860918842318 using a format of decimal / fixed / Precision: 18 / Scale: 0 / Decimal: 2 and it shows in the table as 0.14 until I click on the cell in which case I get the full value above.

This is how I want it to show (0.14). When I run a query on this table, not setting any formats in the query, I get 0.00, and clicking on the cell only provides a result of 0. I've tried a ton of different underlying formats on Table 1, and been unable to get a different result...

View 1 Replies View Related

Queries :: Format A Query Prompt?

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

Field Data Format

Oct 11, 2006

I want my PRODID (PK, AutoNumber) field to have "PROD-" before the number, i thought it could be done by seting format to "PROD-"# but that only displays it inside MS A, when i use sql queries through php it only retreives the number. How can i avheve this?

View 3 Replies View Related

Format Date Field

Feb 19, 2007

I saw a thread once that explained how to format a date or phone number field after you've entered the data, but I can't find it again.You do it so that you don't have the __/__/__ or the ___-___-____ pop up in the field and don't have to worry about inadvertently starting typing the data in the middle of the field instead of the beginning.Anybody know where that thread is at, or know how to do that?

View 2 Replies View Related

Format Variances Within Field

Mar 11, 2008

Is there a way, either in a form or report, to modify the format of a text string within a field?

Basically, we are gathering text data using a memo field (due to the amount of data) and would like to highlight sections of the text by making it bold. It does appear that in Access a field is all or nothing in terms of formatting.

Can one put characters that would identify the start or end of such a string in the data itself?

Thanks.

View 2 Replies View Related

Calc'd Field Won't Format?

Aug 11, 2006

I have a calc'd percentage field in my query. This is a multi user app and the problem is that is can (and does often) happen that the numerator information for my calc gets entered before the denominator data and therefore the calc'd field shows and as an error.

I attempted to use a simple IIF statement to input a message rater than the error code but now the field will not format to Percent. It worked, I got the message to display and it calc'd the records that had data, it just will not display in percent format. It does let me set the format to percent, it just doesn't display and does not allow the decimal places to be set.

This was the line:
CalcPercent:[Numerator]/[Denominator]

This is the new line:
NewCalcPercent:IIf([Denominator] = 0, "Message", [Numerator]/[ Denominator])

I've tried to search for an answer and I'm sure it is going to be something simple that I've overlooked.

Any thoughts?:confused:

View 3 Replies View Related

Format Field To Date

May 17, 2007

I have two tables that I import that have both a date field and a time field formated as text. date field looks like yyyymmdd and time looks like hhmmss. I am using two append queries that combine the data into one table and I need the date and time fields to be date and time format respectively. When I run the query as is I get no values in either the date or the time field due to a data tyoe mismatch. My question is how do I convert the input table date and time text type fields to date and tie format for the append query.

Thanks for the help

Tony

View 2 Replies View Related

How To Change Field Format

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

Change Field Format Using VBA

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

Queries :: Export Query Date Format?

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

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 8 Replies View Related







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