Queries :: Identifying Whole Numbers Vs Integers
May 2, 2013
I currently have a calculated field that will result in either a whole number or a decimal. From there, I need to set up a field that identifies if the previous field is either a whole number or a decimal.I have tried several different formulas, but always seem to get an error or a query that does not return any results.
View Replies
ADVERTISEMENT
Nov 15, 2007
Hello
I have some data I need to clean.
It is in an address field the majority of the data is fine but there are some records with words that have been spelt with numbers:
2 9RAMBLEGATE
2 Forest V1EW
2 KEM8LE Close
2 BELLEMOT4TE Road
Is it possible using a query to find instances where this has happened so I can flag these?
Any help would be greatly appreciated
Tim
:confused:
View 7 Replies
View Related
Jul 29, 2013
I need to exclude non-integers in my query and have forgotten how to do this.
What i need to put into the criteria field within my query to to this?
View 2 Replies
View Related
May 22, 2015
I have a query which returns, among other things, a number of boolean fields. In some cases, there will be a genuine True or False value in each of these fields; in others, it can and should be Null (e.g. as a result of a 'failed' LEFT JOIN of some description, where there is no associated record in the joined table which fulfills the criteria)
So something like this :
Code:
SELECT [tblTable2].[fldBooleanField]....
FROM [tblTable1]
LEFT JOIN [tblTable2]
ON [tblTable1].[SomeID] = [tblTable2].[SomeID]
However, I will be writing the result of the query to a text file and here's the problem. I want to show a numeric value for a genuine True / False (i.e. -1 and 0 respectively using the standard boolean conversions in Access) and a blank for any Null values.
So I tried this :
Code:
SELECT CInt([tblTable2].[fldBooleanField]) AS fldBooleanField....
FROM [tblTable1]
LEFT JOIN [tblTable2]
ON [tblTable1].[SomeID] = [tblTable2].[SomeID]
However, currently when I look at the exported recordset in Notepad, I am getting 0's for both False and Null values (and -1 for True)
How I can adapt my query to keep Nulls...null? And convert the genuinely present boolean values to integer form?
Only thing I can think of is to use (untested) :
Code:
IIf([tblTable2].[fldBooleanField] Is Null, Null, CInt([tblTable2].[fldBooleanField]))
But there's a number of boolean fields in there, all requiring the same treatment.
View 14 Replies
View Related
Oct 2, 2014
I have a query (A) as the data source for a report. That query (A) has a another query (B) as one of it source files.
How can I tell if query (B) has no output, so I can stop query (A) and the report attempting to run.
View 2 Replies
View Related
May 22, 2014
I have a statement as follows:
Code:
ohc: IIf(([oh]/[csqty])>1,[oh]/[case_qty] & " (LTSU?)",[oh]/[case_qty])
The intention was that it would add " (LTSU?)" to the calculated number where it was less than 1 (or not a whole number). Stupidm, me didnt account for fractions greater than 1 (ie 1.566). Just wanted to know how I can identify all 'non-whole' numbers in the above IIF statement.
View 3 Replies
View Related
Jul 10, 2013
I have two tables. One table is a list of classes with the number of enrolled students:
Class............StEnrolled
English 1A........6
English 1B........12
English 1C........20
English 1D........25
Reading 1.........4
Reading 2.........15
And the other table is a list of "combined" classes (meaning they are, essentially, the same class and should be counted as such):
Class...........CombinedWith
English 1A.......English 1B
Reading 1........Reading 2
Using the first table, I currently generate a query (and build a report) that displays class enrollment levels. What I need is for this query to identify combined sections from the second table and display them as such:
Class........................StEnrolled
English 1A/English 1B........18
English 1C.......................20
English 1D.......................25
Reading 1/Reading 2..........19
View 7 Replies
View Related
Aug 12, 2014
I'm having multiple problems with my database like things such as -
i'm currently working on the Query 2 - On the Phone database (ignore Query 1) and i want to search for multiple plot numbers preferably in one parameter prompt with a comma to seperate numbers. (this could be a multitude of numbers so i would like to be able to input as many as needed). Also when i do search on this query since the Criteria is a 'Between' Value i would expect everything between the 2 numbers input to show up - but a lot of numbers out of the range show up too - why is this? (The Numbers are like "69 to 136" and they will show up - but 1-69 and 136-170 would too
I would also like to implement the search results from Query 2 into the Form i currently have made but it just opens up a access table when the search is made?
i cannot link my database as it is too big for the server - But here are the Criteria for Query 2:
Plot No - (criteria = Between [Enter First Plot No:] And [Enter Last Plot No:])
Site - (criteria = Like "*" & [Enter Site:] & "*")
Product - (criteria = Like "*" & [Enter Product:] & "*"
The Query is the one im most concerned about , i can live without a form.
View 14 Replies
View Related
Oct 6, 2005
Hi All,
This question has probably been asked before, but couldn't find a related topic. My question:
How can I import long numeric values (integers) greater than 2,147 billion (standard long integer). I tried a lot, but couldn't find the answer.
Thanks.
View 7 Replies
View Related
Sep 11, 2006
Hi.
I have a form with two text boxes, call them FIRSTNO and LASTNO.
The user inputs a first and last number into these boxes, and what I want to do is append to table NOS all integers between these two.
E.g. user inputs 6 and 11 and I would like table NOS to contain 6 rows, with the first field containing this number, like so:
6
7
8
9
10
11
It sounds easy, but I’m struggling!
Any thoughts appreciated. Thanks in advance.
View 2 Replies
View Related
Feb 25, 2008
I need to be able to precisely handle nonnegative integers (in the math sense of integer, not the VBA sense, of course) between the values of 0 and 808,035,046,350,570,000. (Don't ask.)
I'm wondering whether I should be handling these numbers in a string and do everything manually, or whether the datatype Decimal or Variant will work for me.
I read that Decimal handles +-79,228,162,514,264,337,593,543,950,335 with no decimal point, or +-7.9228162514264337593543950335 with 28 places to the right of the decimal.
I absolutely cannot have the "rounding type errors" and "oddities" that you get by storing integer values in doubles, for example, due to imprecission.
Seeing that Decimal seems to work in a decimal point manner worries me, that perhaps I shouldn't be using it for this scenario. However, it's range seems so much larger than what I need, I'm wondering if I would "get away" with it.
If needing no imprecission to creep in means that I have to use Strings and implement my own String math library, that's the route I would have to go.
Question 1 - If I need the numbers to be exact (again, nonnegative integers, no decimal points), do I need to use a String, or should I use a Decimal or Variant type?
Question 2 - What is the difference between Double and Variant, for the purposes of storing numeric values? I read that Doubles are 8 bytes, and Variants are 16 bytes, however the Variant description is "Any numeric value up to the range of Double", which confuses me since it's double the size.
View 5 Replies
View Related
Feb 14, 2007
I have made some accounts with the user-level security wizard, and i was wondering is there a way to know who logs in?
Im wanting to give a person preset information on forms and stuff.
View 8 Replies
View Related
Oct 23, 2006
Hi
I have my table set up to add today's date as a "date last updated" field. this works for all new records but I need to flag instances where a user has amended any existing records, so that on a daily basis I can filter out anything new based on the "date last updated".
Any ideas how I can flag changes to existing records?
Apologies if this is a straight forward question I'm fairly new to Access
View 2 Replies
View Related
Jun 26, 2005
Be advised that I'm a complete novice with Access, and have used it only to view Excel files with more than 64,000 records. Any help would be appreciated.
I have an Excel file of 10,000 records entered by salesmen of possible prospects, with salesmen, prospect name, address fields. Some salespeople have entered the same prospect and address information; the only thing different in these records are the salesman name.
I know how to import the file into Access. But from this point, how do I construct a query and generate a report that shows me ONLY THE DUPLICATE RECORDS? We would like to use this report to identify the double entries and the salespeople so they can clean up the database. I know Access (I have Access 2003) can create this query, I don't have a clue on how to do it.
One hint: A post on another forum suggested " Make a group-by query (grouped on all fields except salesperson). Add a count field. Select if count >1. This should do the trick."
I'm sure this is the answer, but I don't know how to "make a group-by query", how to "add a field", etc. Like I said, I know how to import the data. That's it.
This is extremely frustrating to be this close to the answer and not know how to finish it. Any assistance would be appreciated. Thank you.
View 2 Replies
View Related
Jan 17, 2006
Apologises if the answer is out there somewhere but I have searched to no avail.
I have a number of Forms which the user can jump around from one to the next. All the forms remain open with the form they are currently viewing showing on top. If they make a change on one particular form then when they return to a previously viewed form I want to disable or hide certain certain controls etc.
I know this would be simple to do on the on open command but as previously mentioned as I am not closing the forms after they are viewed, if the user returns to a previously opened form then this is not picked up.
Soooo, basically I'm after something like
When the user moves from one form to another already opened form for the new form to immediately know that it now has the focus and for it to do something along the lines of on open.
Any help will be appreciated
View 8 Replies
View Related
Mar 13, 2007
Is there any function or code that would display the workgroup in which the current user belongs simular to the function "currentuser()" which displays the user logged onto the db?
View 9 Replies
View Related
Mar 22, 2007
I am new to Access and just inherited a very large database to work with. Is there an easy way to figure out the relationship between each table and how they are linked? Thanks.
View 5 Replies
View Related
Jan 5, 2015
I'm familiar with screen.activecontrol but what I am trying to do is to activate an event relevant to the control currently triggering the mousemove event.
In the attached db, if you open the MMHighlight form and move the mouse over the boxes, as they are moved over they go yellow (mousemove event), whilst still hovering, click on a box and the first box displays the first and last boxes selected (mousedown event). release the click to trigger the mouse up event which clears the boxes. Broadly this is working as intended
The problem is the mousemove event which has to be 'personalised' for each control - highlighted in yellow
In the real application there are several hundred controls, so I'm looking for a timesaver - one option being to build a form via vba, but ideally some equivalent to screen.activecontrol and perhaps a third where I can replace [text0] with a generic name - a bit like 'Me' to refer to the form.
View 12 Replies
View Related
Feb 1, 2015
I have a table (Imported from Excel) with In and Out records.
Here are the problems I have:Each record has either In or Out data. I have an identifier to know which ones are In and which ones are Out
It might have some misses, either no In or no Out record for the specific work time. A worker can get in at the evening and get out at the morning of the next day. Might have more then one entrance/exit on the same date.
I want to have the record sorted so I'll have an In and Out on the same row (record) including holes for the missing ones.
View 9 Replies
View Related
Oct 20, 2015
I don't know if this can be done. I'm using Access 2010 and I have users updating information on a hourly basis.
Can I have a field that basically shows the last user that edited the form or saved it?
View 6 Replies
View Related
Nov 23, 2014
In the Table I have in the trailer database has, among many, 2 fields called 'Maximum Length' and 'Minimum Length'. Say, the data in these fields could be 5 and 4 respectively. I would like to create a search box where I can type in any length such as 4.4 and the database would return the trailer that can fit this length. (Sot the searched value is between the Min. and Max. length) What would I need to type into the query box and the search form to type in the length?
View 6 Replies
View Related
Mar 12, 2014
I have a checkbox on my form that basically deletes a record when the user ticks the checkbox. What I want to know is how do i check whether the person is "ticking" or "unticking" a checkbox before any action is carried out?
View 3 Replies
View Related
May 19, 2015
I have a large database. I want to identify which objects take up the most space. Any way of identifying a list of each object with their relative size?
I can do this in sql server, but no in Access?
View 8 Replies
View Related
Jan 15, 2015
How to make a form that must Check the username and password of a user, in case if they are true then let the user to visit other forms and Tables...
View 1 Replies
View Related
Dec 19, 2014
Is there any code to be able to be used within a query to locate the 1,2 or 3 digit numbers?
such as 1 ,11, 111 - 2, 34, 834 etc...
View 4 Replies
View Related
Dec 31, 2013
I have a column containing an id that consists of the first two letters of a weekday followed by an incrementing number. For example, for Monday, I have "MoA1" "MoA2" "MoA3" ... "MoA11".
The problem is that when I sort my list, it is ordering it: "MoA1" "MoA10" "MoA11" "MoA2" "MoA3" etc. Currently, my order by property is set to
MID(TABLENAME.SORTFIELDNAME, 3, LEN(TABLENAME.SORTFIELDNAME))
View 3 Replies
View Related