Create Query That Removes Any Entries With More Then 5 Digits?

Nov 14, 2007

Hi,
I'm trying to import data from another database (codes), and the text field in that database is set to 7.

Our new database only needs the first 5 digits of the codes, so I'm wondering is it possible to create a query that filters any entries where the code field has more then 5 digits?

View Replies


ADVERTISEMENT

Queries :: Create A Query That Asks For Multi Entries In One Column

Apr 11, 2014

Is it possible to create a query that asks for multi entries in one column .....

For example : If I have parts that I purchase and some of them get rejected I want to inform someone of those parts, these parts could be on order numbers, 1,2,8,10 ....

I cannot just search on rejected because some parts could have been reject say 2 weeks ago but new ones have not arrived yet so the flag "rejected" is still showing ....

Is it possible to set the criteria that when asked for the order number/s you could type in ,1,2,8,10 ....

View 1 Replies View Related

Tables :: Create One To Many Table Entries?

May 8, 2013

I'm new to MS Access, indeed database design as a whole.

I have been tasked with creating an issues logging database and am having some issues...

I have a table/form that has all the fields I want, including a unique ID, called "Issues". I want to be able to log multiple entries in another table called "emails". The trouble is I am not having much luck. I can create an entry in the issues Form which then shows in the emails but I can't then add another email under the same ID in the "Issues" table.

View 2 Replies View Related

Forms :: One Form To Create Multiple Data Entries

Dec 30, 2013

What the database currently has: A payment entry form consistenting of many fields. This form populates a payment entry table. Some of the fields within the payment entry form are linked to other tables and queries for data (such as a recipient list).

What the database now needs: A group payment option. Should ten people attend a dinner, the total cost needs to be divided among the attendees, and then the payment entry form table populated with ten different entries and the subdivided cost of the dinner per person.

My thoughts: The most ideal thing to do is to have a hidden recipients window show up when the user indicates that this is for a group event. The user could then add all the additional recipients (beyond the primary which is already collected on the form), and the total amount for the meal. The database would then generate an entry for each recipient listed, dividing the total cost among them, and then simply duplicating the rest of the information as is.

View 14 Replies View Related

Forms :: Entering One Item To Create Multiple Entries In A Table?

Nov 7, 2014

Basically I am inputting stock into my database so I can have a record of what I have left and who it's gone too. Where I'm stuck though is when I want to add an item that I have more than one off but only enter it once and have it assigned a unique stock ID number (this is in the form of an autonumber) for however much quantity I choose to enter. So for example I have 5 keyboards, I type in 'Keyboard' into my item field (named txtItem) and then type '5' into my quantity field (named txtQuantity). When I then press Add Stock (named btnAddStock) I should then see in the table, 5 separate Keyboards listed each with a different Stock ID number.

View 14 Replies View Related

How To Query The First 3 Digits Of A Field

Aug 3, 2006

I'm trying to export from a text file. However one of the fields contains 2 items of data, ie the code and name of a person.
eg 'po2 Paul O Mahony'. What I want to do is query only the code(first 3 digits) from this field. ie 'po2'. Is there a way of doing this within a query (sql) or do I have to use vbscript to solve this?
thanks

View 1 Replies View Related

Update Query For Number Less Than 8 Digits Long

Mar 13, 2007

Hi there

Im working on an update query to add 2 zeros to the front of a field where it is less than 8 digits long. I'm not sure how to go about this, can anyone help me out?

Cheers

View 5 Replies View Related

General :: Update Query To Replace Letters And Digits

Feb 27, 2015

We have a field of 7m records of varying length, some of which are numbers, some just letters, some alphanumeric, and most which include a dash, space or some sort of punctuation mark.

We need to replace all letters with "L", then replace all digits with "@".

We can replace characters individually using this update query:

Replace([Ref Digit Or Letter],"A","L")

But would like to use wildcard searches to resolve this, something like (these don't work!)...

Replace([Ref Digit Or Letter],"A-Z","L")
Replace([Ref Digit Or Letter],"LIKE [*A-Z*]","L")

View 13 Replies View Related

Queries :: Run A Query That Count Number Of Digits In Each Field / How Many Of Each Exist

May 8, 2013

The field SECL DDI has the users phone number unfortunately over time these have been entered in different formats so there are 5 digits, 6 digits, 7 digits etc...Can I run a query that counts the number of digits in each filed and then tell me how many of each exist

Ie

4 digits 3412
5 digits 5000

View 4 Replies View Related

Timesheet Table To Create Popup If Timesheet Entries Is Not Entered Day Before

May 24, 2007

hiya, just posted a message today.

Problem, ive got a work database which employees logon to and enter time against certain projects they have been working on. What i need is to somehow create some code that will look at each of the employees names and sum up there total time for the previous day. If this is less than say 6 hours of timesheets or even zero entries have been made, I want a pop up message to pop up as soon as they logon to the datatbase the next day and jsut mention they need to fill in there timesheets.

At the moment each person when they log on to the database has there name they logged in as, placed into a field (called "First Name") within form (called "Employee Startup Screen"). *** maybe use this as a way to identify who is logged on and when to run the code.***

Timesheet table has the following columns:
Employee; Date; ProjectID; Timespent

PLEASE help im a noob at this and have tried using some code on a query that sums up the previous days times filter on a employee. When the "Employee Startup Screen" opens it runs the following code

Dim internal1 As Integer

internal1 = Me.SumOfTimeSpent

If internal1 < 6 Then

MsgBox " Less than 6 hours have been entered " & Chr(13) & " into your timesheet for yesterday. ", vbCritical, Title1

ElseIf DCount("*", Me.SumOfTimeSpent) <> 0 Then

end if

End Sub

----------------------------


BUT it doesnt work if no entries have been made on the timesheet as the query result is blank.

ANY help would be muchly appreciated.

Thanks Keith

View 4 Replies View Related

Creating Two Tables - Old Entries And Weekly New Entries?

Mar 13, 2014

I have a table in access which is updated weekly; I need to create two tables from this updated table.

1st table will consist of all the new entries for the current week

2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.

ID
Name

1
Adam

2
Ben

This week I have three new entries New entries

ID
Name

3
Charles

4
Richard

So when I run the same query next week I will get something like this.

Old Entries
ID
Name

1
Adam

2
Ben

3
Charles

4
Richard

[code]....

How do I get a query /queries which divides up the weeks new entries and also all the old entries.

View 11 Replies View Related

IIF In Query Q - Listing All Entries

Jun 20, 2006

Hello,

I currently have a DB that has a field in a table that records which shift (A, B, or C) that some data was collected on. I am trying to write a Query in order to filter the results so that either the data from shifts A,B, or C show up, or if "All Shifts" is selected, then all the data shows up. I have another table set up that records the shift selection from a form. I was trying to use an Iif statement but it does not seem to be working for the "All Shifts" option. Selecting "Shift A" or "Shift B" etc. works fine.

IIf([ShiftSelect]="All Shifts","Shift [ABC]",[ShiftSelect])

**[ShiftSelect] containts the users selection for which shift they want to view.

I have also tried this with a wildcard statement (Like "*") instead of "Shift [ABC]", to see if I could get any data to show but I still get nothing when "All Shifts" is selected!

Let me know if you can see the problem, or know another way to go about this query!

View 2 Replies View Related

Query Multiple Entries?

Sep 12, 2006

Hi Folks,

I was just wondering if its possible, i'm sure it is.......
I've got a query to pull out invoices for a certain Project it brings up all project invoices and puts it into a report which works fine...... what i want to do tho is perform the same query but after i type in project code in criteria [] i then want to type peoples name or ID's that i want to print as some will be sent at different time intervals and i don't want to have to sort through invoice's to then send? is it possible? any one got any examples?

Thanks in Advance

View 1 Replies View Related

Query To Get Only Latest Entries

Feb 26, 2007

I am having difficulty formulating this query.

I have 2 tables... 1 is customer info (name, address, etc...), and the second is shipments (ShipToCustomerName, ShipmentDate, etc...).

Now, I wish to query the shipments table to get ONLY the LATEST shipment information for EACH customer.

If customer A has a shipment in Jan 1, Feb 2, and March 3... while customer B has a shipment in April 4 and May 5. then the result of the query should be

customer A - March 3
customer B - May 5

Is there a simple way to construct such a query?!?

Thank you for your help,

- arm

View 1 Replies View Related

Locating Multiple Entries In Query

Mar 3, 2006

Hello, I have searched the forums and found plenty of information about eliminating duplicate values. What I would like to be able to do is run a query and have it show me only the records that have the field "serial number" that contain the same number. That is, I want to be able to query and see which serial numbers have been entered more than one time. The serial number is not the primary key, this database keeps track of product repairs and is used to log them in by the primary key serial number/date. Thanks in advance for any help. Tim

View 2 Replies View Related

Multiple Entries Using Append Query

Aug 1, 2006

Hi all
Can someone help me with an Append query problem I am having. The end result I need is a Work sheet that has a Customers details, Plant details, Work required and a Subcontractor name. I have a search function that I use to select either a Customer name or Plant ID. Once I have selected the Customer name/Plant ID, I use a button to append the Customer Name and the Plant Id to a Plant_History table. This table uses an Autonumber field to create a unique identifier for each entry which I am using as the Work Sheet number. I have then added coding to open a form which accesses the Plant_History table directly so I can enter the work required and the contractor to carry out the work.
My problem is that the Customer and/or Plant will have multiple entries in the Plant_History table. Currently, when I select the button to append the details to the Plant_History table, if the Plant ID is already in the table, the number of records is doubled in the Plant_History table (eg if the record has previously been entered 4 times, 8 records will be appended to the table). I am not sure why this happens, if someone could point out the fault in my work, it would be much appreciated.
Regards
Craig

View 1 Replies View Related

Queries :: Query With IIF And Null Entries

Jul 29, 2013

I have a form that feeds information to a query which in turn sets up a report. For clarity i will list out in basic terms what I have

Input Form
- Check Box to activate/De-activate a text field [chk-active]
- Text field for a parameter [txt-Parameter]

the query has a column that has null values from the originating table. These values will be added a t a later date, but need to be queried and reported at some business intervals.

In the query criteria for this column, I have the following Criteria

Like IIF([Forms]![ReportGenerator]![chk-Active]=0, "*", [Forms]![ReportGenerator]![txt-Parameter])[/I][/I]

I have tried for the last 5 hours to figure out how to write the formula to be able to get the blank entries to show up as well but have had no luck.

View 5 Replies View Related

Last 4 Digits Of SSN

Oct 12, 2004

I have a database that uses the SSN as the primary key, but only the last 4 digits of the SSN need to be shown on the reports that are generated. I can't figure out how to use the Left function to extract only the last 4 digits. For example if a SSN were: 123-45-6789 I would want the field to read ***-**-6789, or just 6789 whichever is easiest. I would appreciate any help that could be given.

View 3 Replies View Related

Last 4 Digits Of Ssn

Feb 13, 2008

I need to pull only the last 4 digits of the SSN. How do I do that in my query?

View 1 Replies View Related

Append Query Problem, Wont Add Entries

Jul 30, 2007

I am trying to add data to the same column which is in multiple tables at once by running a macro that has multiple queries. I run a macro, and the first is a delete macro, which deletes the column and then the next is an append query which then adds the new column wtih the new data....and it works, for adding it to one table. But when I try to do this for updating two tables from the one macro (using 4 queries, 2 add, 2 delete), I get the usual warning messages "you are about to add/delete 10 entries, and this is for the first table, so i just lclick "ok" "ok" and then i get the message "you are about to delete 10 entries" for the 2nd table, PROBLEM IS THEN I Get message "You are about to append 0 entries" IT SHOULD BE APPEND 10, its the exact same query setup.....it deletes them from all the tables, but then it will not add them to the 2nd, 3rd, 4th table etc etc.....it keeps saying "will append 0 entries" PLEASE HELP, otherwise im screwd lol.

View 1 Replies View Related

Remove Duplicate Entries In Query Design

Oct 27, 2013

I am attempting to filter the data in query design such that it will not return anyone in the database has there name present more than one time.

For example, in the image below under the Owner_Name field there is "Abbot, Mark C Etux Wanda C". This name appears twice in the database. My criteria is the name can only appear once, therefore this record would not be returned after the query. In query design I would like it to return only name records that appear once in the entire database if there is a way to structure that.

View 1 Replies View Related

Compare Digits

Mar 8, 2007

Hi there!
I'm bulding this database where the user will have to insert a full phone number. What I would like to know is? if is there any way where Access can pick the first 5 digits of the number to compare with information already imputed in. by example if the user input the number 01942789789, access pick the number 01942 to look for a match? I know I could do with two diferents fields one for the code number and other for the number, but my boss only want one field. Is there anyone that could help me

Thanks

www.joaobeca.co.uk

View 1 Replies View Related

Sort By First 2 Digits Only

Jan 19, 2006

Open the database – then open the Report: rep_Billing

I have a query that is doing some sort and count functions. The column [TYPE] is sorted then counted. Instead of sorting by the full name can the query sort based off of the first 2 characters?

Example:
On the report the first company is: AMERICAN POSTCARDS

First it separates the colors, which is good.
Then separates the [TYPE] then counts the total amount that color was that type.
However I do not want the full type to be separated out, I want it based on the first 2 characters so that the “N-“ will all stay together as a group.

Final count should say: AMERICAN POSTCARDS
GREEN RA 3
RED N- 14
RED PR 16
RED RA 12
BLUE NC 1

I know I can get this info from the report, but it has to be done at the query level because it is going to be exported into another system at that point. Thanks.

Let me know if I need to make this clearer. Thank you all.

Travis

View 2 Replies View Related

Show Everything BUT The Last 3 Digits

Sep 7, 2006

Hi,

I am writing a very very simple query to identify postal codes from a list of addresses. The table containing the data has a field called POSTAL_CODE.

I need to exclude the last three digits of this postal code so as to only show the first 2,3,4 digits.

Example would be simple by having a query just showing the first few digits like this Left$([POSTAL_CODE],4) for example, however that will not show correctly for SK6 5LP and M2 4DJ and SK12 8LY.

I have either 2, 3, 4 digits I will need. All that is sure is - I do not want to see the last three digits. Identifying the last three is of course simple, but I cannot exclude them. Tried this

Right$([POSTAL_CODE],3) - and calling the field LAST_THREE
and then ([POSTAL_CODE]-[LAST_THREE])

However does not work because these are numbers and letters.

Probably a simple one, can someone please help - perhaps a query that sounds like this : show all but not Right$([POSTAL_CODE],3)

Ta

View 1 Replies View Related

Show Everything BUT The Last 3 Digits

Sep 7, 2006

Hi,

I am writing a very very simple query to identify postal codes from a list of addresses. The table containing the data has a field called POSTAL_CODE.

I need to exclude the last three digits of this postal code so as to only show the first 2,3,4 digits.

Example would be simple by having a query just showing the first few digits like this Left$([POSTAL_CODE],4) for example, however that will not show correctly for SK6 5LP and M2 4DJ and SK12 8LY.

I have either 2, 3, 4 digits I will need. All that is sure is - I do not want to see the last three digits. Identifying the last three is of course simple, but I cannot exclude them. Tried this

Right$([POSTAL_CODE],3) - and calling the field LAST_THREE
and then ([POSTAL_CODE]-[LAST_THREE])

However does not work because these are numbers and letters.

Probably a simple one, can someone please help - perhaps a query that sounds like this : show all but not Right$([POSTAL_CODE],3)

Ta

View 2 Replies View Related

Wildcard For One OR More Digits?

Mar 14, 2007

Hello, I'm trying to use wildcards to filter for records that contain a date somewhere within the string.

I'm using Like "*#.##.##*" which works for dates that have a day of the months >10, but what about those under?

Well, Like "*#.#.##*" only works for those with the day of month <10. Is there a wildcard character for "one or more digits"?

Also, the above example excludes Oct. - Dec. for the same reason.

help!

Thanks,
Gifford

View 4 Replies View Related







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