General :: Using Wildcards To Find Number In A Sentence
Mar 4, 2013
I should find the position of a number in a sentence and later extracted. The number is attached always to an "E". ie: E1, E2, E3,E4. The range of the number is 1-4. I have this until now:
I have a access table with 32 columns and 42,000 rows of numbers. I need to find the MIN number in the row and if the MIN number has duplicates then I need them all placed into another column by column name. Example: Starting file DEST,ORIGIN1,ORIGIN2,ORIGIN3,ORIGIN4, ETC 05512,3,2,4,2
I have to tables, where if data in one field is in both tables I don't want the row to be shown in my query. I have triede with a IIf sentence, but I can't get it to work.
What I am trying to do is split a sentence into words LikeJocelyne Labylle And Jacob DesvarieuxThis would produce 4 words as the and,&,/ Ect are removedSo I end up with:-JocelyneLabylleJacobDesvarieuxIf all 4 words are found in a string it returns all matching records plus gets 100%3 words again returns all matching records plus say 75% and so onI haven't done a lot with it at the min as the first bit is quite simple IE getting the names Etc. but I can't think for the life of me how I can do the search.I Have Tried a query With [Names] Like ""*[String Names]*""" but it seems to only work with each letter???but my main reason for asking here is I don't like reinventing the wheel or at least trying to which will mean hours of Fun but maybe somebody knows of something I could use on the net.Thanks for any help/Advice.mick
I'm completely new to Microsoft Access. This project was thrown my way. I have an accounting database to track payables, receivables, financials, and deliquencies/collections. Is there a way to generate a report for any of the items in the previous sentence that haven't been completed to keep track of workload.
I am creating a form for users to enter data. Each entry needs to have a "Event ID" associated with it and these Event IDs may be used more than once but will refer to the same Event (if it was a single entry with no duplicates, I would just use the rows primary key). How to create a query that looks at a list of existing numbers (Events already in the table) and returns the next/an unused number? I would like to create a button that says "Next available Event ID" and provides the user with a number.
Hello, I am trying to generate some query result on a form. My DB consists of the following fields : tradeID and profit/loss. How do i make a query to find the Maximum consecutive number of wins and losses in the database and display the results on a form?
Would really appreciate it if any of you have tried to sort and display results for finding consecutive number of events in any database!
I am looking to find if a field contains a number and then build a case statement depending on which number is found. The field will contain data just like this:
Quote:
Repaired frequency response and grounding issues. Replaced 2 Hybrids, capacitors, and connectors. Tested MER/BER and operation to specs.
Here is my code that did not work:
Code: If Me.txt_work_comm1 Like "*Hybrid" Then 'Sets up auto priced based on number of hybrids entered '1 hybrid If Me.txt_work_comm1 Like "*1" Then strCriteria = "repair_item = 'Charter RF Amplifier Repair + 1 Hybrid' AND profile_types = 'Alpha'"
[Code]....
To Summarize: 1. I need to find if the word "Hybrid" or "Hybrids" is in the field 2. Then I need to know how many to determine a price
I'm trying to get an invoice number field to auto generate the next number, keeping the format as "00000"...this is what I have, which gets the next number but drops the leading 0
Code:
Private Sub Customer_AfterUpdate() If Len(Me.[InvoiceNumber] & vbNullString) = 0 Then Me.[InvoiceNumber] = (DMax("[InvoiceNumber]", "[tblInvoiceNumber]") + 1) DoCmd.RunCommand acCmdSaveRecord End If End Sub
invoice numbers are 04024, 04025 etc...how I keep the formatiing?
I have a table with an auto number PK. This table will contain orders. I'd like to use the PK from this table as the Invoice number on the invoice. I'd like to have it start at a number other than "1" just because it looks better on an invoice. I don't know how to do this. I looked at the table design to see if there were options available to me there but couldn't find anything. Is it possible? (I do not know how to use code.)
hi guys.. i want to include a search form in my database.. here is my current SQL statement:
SELECT tblCompany.CompanyIDPK, tblCompany.CompanyName, tblCompany.CompanyAddress, tblCompany.ContactPerson, tblCompany.ContactPosition, tblCompany.OfficeNo, tblCompany.MobileNo, tblCompany.FaxNo, tblCompany.EmailAdd FROM tblCompany WHERE (((tblCompany.CompanyName)=[Forms]![frmSearchClient]![txtSearchFor]));
but this statement only returns the exact name of the company... if the name of the company in the database is ABC company and you searched for "ABC", it will return zero results... so how can i improve on this? that even if they enter only "ABC", it will return a result.
I'm making a student report card. Teachers enter student data via a bound form. I have a text field that teachers enter their class which brings up student names. They fill oput the form accordingly.
I have 6 classes of grade 7. 7A, 7B, 7C and so on.
If a teacher enters something weird like (7 (space) A) the query bound to the form will return nill results because it's looking for something that doesn't exist. I need an error message to appear which says no records will be returned because you haven't entered the correct parameter value. (Because they have entered 7spaceA rather than just 7A.
I could just use a combo and this would solve all my problems. But it's not always practical. I was thinking I could use a wild card where if the first character was a number then at least some values would be returned. There is method to my madness... I actually want to apply the same code elsewhere when running reports.
Is there a way I can enforce some kind of input mask in an event proceedure that can do this??
I have data of type "number" shown in the drop-down combo-box in a form. It has some codes in the event of "After Update".
My problem is that i can't type in something like 13* in the combo-box in order to get anything starts from 13. It says "The value you entered isn't valid".
The reason is that i want user to be able to use the wildcard. I know that i can do this with text. I'm not allowed to change the structure of the table in the database.
This combo-box shows IDs from one of the exisiting tables. That IDs is of type "autonumber" in the table.
I've got a query that is defeating me, but that might be due to a week's worth of insomnia related sleep problems. My issue exists in the following query, of the four IIF statments in the HAVING portion of the query and the need to select all if the statement is false for each one of the four queries, the way it is now partly works by returning all results where none of the values are null, I need to get null results as well. I've tried not including the false action for them, a wildcard to select all and just can't get around this problem. Any help appreciated.
SELECT DISTINCT vw_mdb_SalesSummary.Channel, vw_mdb_SalesSummary.Store_Number, [AOI Category groups].ProductType AS Category, dbo_Contact.Source_of_Inquiry, dbo_Company.Rn_Descriptor AS Store_Name, vw_mdb_SalesSummary.Job_Number, Sum(vw_mdb_SalesSummary.Extended_Price) AS Sales1, vw_mdb_SalesSummary.Designer_Code, vw_mdb_SalesSummary.Manager_Code, 0 AS Sales2
FROM ((dbo_Company RIGHT JOIN vw_mdb_SalesSummary ON dbo_Company.Store_Number = vw_mdb_SalesSummary.Store_Number) LEFT JOIN dbo_Contact ON vw_mdb_SalesSummary.Job_Number = dbo_Contact.Job_Number) LEFT JOIN [AOI Category groups] ON vw_mdb_SalesSummary.Category = [AOI Category groups].SalesCategory
WHERE (((vw_mdb_SalesSummary.Order_Date) Between [Forms]![frmLandS]![currentStart] And [Forms]![frmLandS]![currentEnd]))
GROUP BY vw_mdb_SalesSummary.Channel, vw_mdb_SalesSummary.Store_Number, [AOI Category groups].ProductType, dbo_Contact.Source_of_Inquiry, dbo_Company.Rn_Descriptor, vw_mdb_SalesSummary.Job_Number, vw_mdb_SalesSummary.Designer_Code, vw_mdb_SalesSummary.Manager_Code, 0
HAVING (((vw_mdb_SalesSummary.Channel)=IIf([Forms]![frmLandS]![Channel]<>"",[Forms]![frmLandS]![Channel],[Channel])) AND ((vw_mdb_SalesSummary.Store_Number)=IIf([Forms]![frmLandS]![Store]<>"",[Forms]![frmLandS]![Store],[vw_mdb_SalesSummary]![Store_Number])) AND (([AOI Category groups].ProductType)=IIf([Forms]![frmLandS]![AOI]<>"",[Forms]![frmLandS]![AOI],[ProductType])) AND ((dbo_Contact.Source_of_Inquiry)=IIf([Forms]![frmLandS]![source]<>"",[Forms]![frmLandS]![source],[Source_of_Inquiry])));
I am trying to get the OrderBy to recognize wildcards (or to that effect). A scenario would be I would have more than one name in a field, EX: Name2, 4, 6. How do I use wildcards in the OrderBy and they are recognized.
ORDER BY (Table.Field)="Name1", (Table.Field)="Name2", (Table.Field)="Name3", (Table.Field)="Name4", (Table.Field)="Name5", (Table.Field)="Name6", (Table.Field)="Name7", (Table.Field)="Name8";
Im trying to create a query that uses a combo box as the filter criteria. However the combo box needs to use wildcards, which i would have thought would have been *[forms]![control]![combo1]*. However this doesnt seem to work, anyone know what im missing?
I have a table called Coded_Data with one particular field called Codes. This field list a number and a respective code to identify what type of code it is. For instance 123456789-AD...123456789-ADS. I am wanting to create to two columns. One listing all work orders coded with AD and the other withADS. When I use the Like condition with % it returns both AD and ADS in same column. I understand why because the "%AD" returns anything that starts with AD so this is why I get both codes. I only want to get the the AD codes in one column and ADS in the other. I have duplicated the table twice since I am trying to retrieve data from the same field and table but display in 2 separate columns. The duplicated table has a different alias. The problem is in the where clause.
where (((coded_data.codes) LIKE "%AD")) or ((coded_data_1.codes) LIKE "%ADS");
I'd be grateful if someone could offer some help with this to a frustrated Access novice : )
I have a query that filters records according to the value of an unbound text box in my form (basically search on last name)
I want to introduce wildcards into the filtering process but cannot get it to work.
Here's what I've done:
In the criteria field I had [Forms]![MAIN]![Text440] refering to the unbound text box on the form already mentioned.
This worked fine, but the following: Like "*[Forms]![MAIN]![Text440]*" does not.
Nor does various combinations of brackets such as: Like "*([Forms]![MAIN]![Text440])*"
In fact it now doesn't return anything, even if given a positive match. I have trawled help and the forums but to no avail. I have also tried the % character instead of *