Search Result Based On The First Letter Of A Field

Sep 29, 2006

Hello,

I need to create a query that will seach through a column and only return a result with product codes starting with A.

An example of a product code is AA0000034567.... however there is no realy consistancy. Some start with the AA and some don't. Some have 5 zeros before the numbers start others may only have 1, 2, 3, or 4 zeros before the number.... There are approx 76,000 product codes in total.

My end goal is to create a query to find all the records that have a product code starting with A so that I can eventually delete the AA00000 portion of the code and strip the number back to the point where the 34567 starts.

I figured that by separating out the product codes that start with AA would be a good start.

If any one has any suggestions please let me know.

Peter Vav

View Replies


ADVERTISEMENT

Queries :: Search A Field For A Lowercase Letter

Jul 1, 2013

Is it possible to search a field for a Lowercase letter.All data should be capital, but occasionally a user may ann a record in lowercase, and was looking for a query to pull back all records in lowercase

View 2 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...

there will be a simple table from the database behind it, here is the typical structure of a record

<Country>Poland
<Price1>60
<Price2>85
<Price3>95

in this table there will be say a 1000 of these records...
my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country

what i would like is this most convenient system..
as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record

if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)

if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'

all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..

i have posted on other forums, and have been told this can be acheived in access, is it hard?

View 9 Replies View Related

Reports :: Show A Field Based On Result Of Another Field

Dec 4, 2014

I have a list of all previous employers for a job applicant. I can enter up to 10 but I only want the boxes to show if there is a previous position for that box. So, if there are 3 previous positions, I want to see 3 lines. If there are 10, I want to see 10. I have fields [Company_1]. [Company_2], etc. I only want company 2 to show if the person has 2 previous positions entered into the form.

View 1 Replies View Related

Queries :: Conditional Query To Post Result In Field And Filter Result Records?

Mar 5, 2014

I am working with Access 2010, on vista. What I have is a query made up of two tables, one product the other inventory. (see below) query.jpg

In the product table i have a field called "minimum reorder level". In the inventory table i have two fields one called "number in stock" and "number on order". What i want to happen is "number on order" to be filtered by the result, if the "number in stock", is less than "minimum reorder level", if it is, have the result placed in the "number on order" field. EG. if the "number in stock" = 2 and the "minimum reorder level" = 5 then 3 would be placed in the field "number on order" and only the second record from the query would be visible (see below) Query result.jpg The result of this would mean that the field "number on order" would be populated with the result and the and query would also use this to filter the record.

View 1 Replies View Related

Auto-fill Field Based On Search

Mar 5, 2013

My database has four fields: ItemName, ItemNumber, Description, and RelatedItems. I would like to create a query that will search every Description in the database and return that data in the RelatedItems field. The query should fill the RelatedItems field with a list of every ItemName and ItemNumber that contains the ItemNumber of the current record.

View 2 Replies View Related

Forms :: Search Form Creating Error When Type First Letter As Lower Case I

Oct 6, 2014

When I type the first letter I into the search text area I get the following error

Run-time error '2110'
Microsoft Access can't move the focus to the control SearchResults

Most of the code is below

QRY-SearchAll
SELECT Clients.ClientId, Clients.ClientFileNumber, Clients.ClientShortFileNo, Clients.Salutation, Clients.FirstName, Clients.LastName, [Group Branches].BranchCode, Clients.Phone, Clients.Mobile, Clients.Fax, Clients.BpayRef, Clients.TradingAs, Clients.EntityType, Clients.ABN, Clients.ACN, Clients.Address1, Clients.Address2, Clients.Town, Clients.State, Clients.PostCode, Clients.Country, Clients.Email, Clients.ClientGroup, Clients.DateCreated, Clients.Notes, Clients.LastModified, Clients.UserCode, Clients.BdmCode, Clients.CollLongNo, Clients.CollShortNo,

[Code] ....

View 1 Replies View Related

Report/letter Based On Info On Current Form

Feb 25, 2005

I have a booking form comprising of a main form which holds the person details, and a sub form which holds the details

of each course they book. I want to be able to produce a report/ letter from the current form (ie once a person has made a booking)

confirming that the booking has been made and giving a print of the details.

How I can produce a report based on just the current booking information just entered in the form?

Can anyone please give me some advice on this one, I know how to produce general reports but cannot see how to link one to a current form's data?

Regards

Peter

View 3 Replies View Related

Modules & VBA :: Search 1 Field Based On Multiple User Input

Jul 4, 2013

I have a search form that looks up a value in a field and lets the user know if it is there or not, they have now asked to put in multiple values to search... eg. searching containers number, I will put user input box where they can put these numbers

NYKU023561
TRLU102356
TCNU123023

This will search my container number field and show a pop up message box saying..
Please note below
NYKU023561 - has been found you cannot use this container
TRLU102356 - has not been found please check internal system
TCNU123023 - has beeen found you cannot use this container

Below is the basic search I had before which was all I needed.. how can I adapt this?

Code:
Private Sub Command256_Click()
If (CntSearch & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Dim CNT As String

[Code]....

View 4 Replies View Related

Modules & VBA :: Insert CR / LF In Memo Field Based On Search String

Jan 16, 2014

I import a CSV field which has not preserved the CR/LF when it was exported from BCM Remedy. There is no setting for that. The memo field prints on my report like this:

A custom solution would be developed, that once implemented, could become the standard product in similar situation. Normally would assign to Network Engineering, but will work with Ray and the IPT Team to cost out the solution and get approval to proceed. 2012/05/24 10:44:28 AM PCOLLINS Sent to Ray Massie for review to determine if a solution needs to be proposed, or if they can wait for the National IPT solution to be ready in 2013.

I want to add VBA code that inserts a CR/LF in the memo field before all but the first occurance of a string that looks like a date, the first occurance doesn't need it. I will do it right after I import the CSV file into the table, so it happens only once, and it always prints and displays the CR/LF.

The memo field is called "NBS Update" and the table is called "CCRR Remedy Data"Here is what I have, but don't actually know what to put in to find the date and add a CR/LF:

Code:
Dim db As DAO.Database

Code:
Dim db As DAO.Recordset
Dim srtSQL As String

[code]...

View 14 Replies View Related

Forms :: Filter A Form Based On A Field With Wildcard - Make Search Case Insensitive

Jan 9, 2014

Access 2003

Trying to filter a form based on a field with wildcard. My form has a txtCustFilter control where a customer's name can be entered in part or whole. The Customer's name is in PCCustomerName

This code works but, I'd like to make it case insensitive

Dim strFilter As String
strFilter = "[PCCUSTOMERNAME] LIKE ""*" & Me.txtCustFilter & "*"""
Me.Filter = strFilter
Me.FilterOn = True

View 9 Replies View Related

Use Search Qry Result For Something Else

Jul 27, 2007

hi :D
here is my question:

i have a table (tblmembers) with member data (name, last name) etc.
i found how to run a search qry with parameters to ask for name, last name.

i have another table (tblrelationships) with 3 fields
2 for member id's and 1 for the type of relationship they have

i need to run the search query for the member by name (from tblmembers) and use his member id (from the member table) to add it to a new record in the relationship table (tblrelationships).

when i run the search qry, i only get as the result the fields with the member information..
thanks

View 7 Replies View Related

Highlight Key Search Result

Jun 3, 2012

How to I can Highlight key search result.

View 14 Replies View Related

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.

How can I do that?

Regards,
CS

View 8 Replies View Related

Problem Displaying Search Result

Dec 16, 2005

Hi all,

First timer here, so please forgive any daftness on my part. I'm a novice to access setting up my first database. This forun has been brilliant and helped me a great deal. However despite lots of searching I've not been able to sort out this problem.
I have a Form (New Client Details) with a primary key (ClientID), bound to a table (Client Details) and a Subform (Episode of Care Subform1) with a primary key (EpisodeofCareID) bound to another table (Episode of Care). They have a Master/Child link e.g. a client can have multiple episodes of care.
Using a search method I found on this forum I have created a search form (Client Search) which searches on First Name, Surname and Date of Birth. The search is operated by a command button (CmdSearch) with results shown in a Listbox (SelectSearchClientInfo). So the list could contain a number of entries for the same client if they have had multiple episodes of care.This works fine, however I also wanted to be able to select from the list and display all details for that selected record on the 'New Client Details' Form. I've used code found on this site but when I run it the form opens but will only display the first record for that particuler client. This is the code I've tried.
Can anyone help me out and show me whay I'm doing wrong?

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "New Client Details"
stLinkCriteria = "[ClientID]LIKE" & "'*'&" & "'" & Me.[ClientID] & "'" & "&'*'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm stDocName, , , "[ClientID] = " & [Forms]![Client Search]![SelectSearchClientInfo], , acDialog

Many Thanks, This is such a good site!!

John

View 14 Replies View Related

Access Search Form And Result In A Subform

Feb 11, 2004

Hi,

I have a problem to make a search form in access, I want to divise my form, at the top will be the search criter (8 fields) and in details section will appear the result. I use a continuous subform with a query on the searched fields.
But I can't actualise or open the subform with the new results.
I would like a button to start my search or a system to automatically show the result on AfterUpdate event.

Can you help me, please? i trying to solve this for a long time...

Thank you,

Mrflo

View 13 Replies View Related

Forms :: Copy Search Result Into Textbox

Aug 5, 2013

I have a quote form that has a button which opens a simple search form with just one textbox which gives the results in a subform. (the search is for the company name and the subform results give the company name with the full address (company, add1, add2, town, county, postcode)

I would like to have a button on the search form, to copy the correct result into a textbox on the quote.Until now I have just had a cmbox on the quote with the companies and addresses listed. Unfortunately, the users are not checking this list to see if the company already exists and are adding a new company but with slightly different information, so I am getting multi companies. (i.e, smith ltd, smith limited, or Hants, Hampshire etc).

I need a button on the main search form that copies the company name from the search results subform and copies it into a textbox on the quote.I have tried this on a button but it doesn't like it:

Forms![quotes test].[company].Value = Me![COMBINED SEARCH subform].[company name]

View 1 Replies View Related

Queries :: Search With Multiple Fields Result From Query

Dec 26, 2013

I want to make a form which will allow me to get data from a query and search using 3 fields parallel.

Attached the database in 2010 format.

Password of the db is "nolimit".

The query PTM & Equipment should be bound with the form and

If I enter month, PTM and equipment need rest 2 fields displayed.

Like choosing the above 3 fields from the drop down , the next 2 text box should display the rest two fields.

View 3 Replies View Related

Tables :: Search Through Every Record And Return Result In Table

Jan 21, 2014

My boss has a form based on a rather large table with a lot of records/fields and she wants to be able to have a field where she can enter something and it will seach every record in the table and return the results in a table. How do I do this?

View 9 Replies View Related

Query To Look At The 3rd Letter In A Field

Sep 1, 2005

Hi, anyone know if it possibe to create a field within a query that looks at a 3 letter number code in a field of a table named "employee master" to see if the last number is an "I" or not. So for example a number code in a field named "Department" is "KTI". I would like to display "indirect" in that field if it contains a "I" in the 3rd letter of the number. And display "direct" if the third letter is a "D" intstead, tried doing IF statements but not sure how to go about it, any help would be great.

View 5 Replies View Related

Add A Letter To The Beginning Of Field

Dec 4, 2005

When I run a query I want to preceed the result of one of the fields with the letter V.

ie. the field reads GH567Y and I want it to read VGH567Y

Thanks

View 1 Replies View Related

Forms :: Search Form Did Not Return All Data Records For That Particular Result Set

Jun 3, 2013

All using access 2010. Here's the situation. I built a searchform according to datapigtechnologies video. Used a query with criterias on fields i want to search on the form: ex.

Code:
Like [frm]![frmMyform]![MyField]

It worked fine i thought until i ran the same query outside the form without the criteria field. I filtered the query for the same result and the one used on the search form did not return all data records for that particular result set. Ex. on the searchform; I select the fields I wanted to filter then ran the query. I come up with only 9 records when it should be 18 I get with running the exact same query without the criteria and manually filter the results.

View 13 Replies View Related

Queries :: Return Result When Enter Month As Search Criteria

Jun 15, 2015

I cannot get my query to return result when I enter the month of "June" as search criteria. June is listed in the table and query, every other month is returned except June.

I have attached two example for your reference.

View 9 Replies View Related

Queries :: Search Box Result - Add Up List Of Dates That Match A Criteria

Jun 13, 2013

I am trying to add up a list of dates that match a criteria... a search box result.

I have tried DCount, and now I'm doing it through SQL, and no matter what combinations I try I still get an error - usually 3075 - Syntax error (missing operator)

But I can't find anything missing - I copy the SQL into a query view and it works perfectly... but it won't work on its own. And I've tried using DCount with the query as a query object, and I get the same error.

Code:
Dim ResultCount As Long
Dim DateSearch As Date
Dim MyDate As String
Dim MyDateAdd As Date
Dim varReturnValue As Variant

[Code] .....

I've used the >= And < option as it solves an issue with Date Time. What operator is missing!?

View 5 Replies View Related

Forms Based On Queries With No Result

Dec 15, 2005

If you have a form that is based on a select query that has selected no records, the form will display as totally blank.

One way to avoid this is to ensure that the query is always able to select at lest one record; but Is there a way a message can be displayed if no records are selected?

View 3 Replies View Related

Return Result Based On Percentage

Aug 8, 2012

I have a table that has 3 columns: Unique number, Date, and Results

I want the user to enter the unique number and date into the form. Then the "results" column/field will autopopulate a 0 or 1. I want it to populate a 0 85% of the time and a 1 15% of the time. This should be cumulative (meaning not every entry has a 15% chance of being 1). Is this possible?

View 1 Replies View Related







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