Create Macro To Search For Multiple Spaces Before And After Dash And Hyphen
May 3, 2013
I've built a macro with wildcards that replaces multiple spaces of varying numbers after perods, commas, and before and after numbers. Now I want to add a search for the same before and after en dashes and hyphens. (Pretty soon I'll have Word streamling a lot of documents I edit!)
View Replies
ADVERTISEMENT
Mar 25, 2014
GOAL - I would like to have one text box where I enter a sentence
txtKeywords: Access Is For Smart People Smarter Than I
I would like to create a button when clicked moves txtKeywords into another textbox [txtKeywordscombined] field and removes the spaces between the words and adds hyphens
txtKeywordscombined: Access-Is-For-Smart-People-Smarter-Than-I
Would I use the 'Replace' command in even procedures to do this? Another way? Example?
View 1 Replies
View Related
Feb 23, 2013
i orginally thought i should do this in excel but i think when the dataset becomes larger and i want to eventually get it on the web - i thought its access i need?
i have created a mini dataset as an exmaple of what im trying to explain..i have in first column the objects, and columns after this are the elements needed to make the object (i have just labelled the element titles a b c etc - there will be LOTS of elements once i get the dataset created). so if i had a red blue green cream elements - a search would bring back both lights and lamps that i am able to make.
object A B C D E F G H
lights red blue green cream
lamp red blue green cream
garage red blue green cream yellow brown purple pink
house orange white green blue red black
garden orange white green blue red
garden house orange white green blue red
is there a way of creating a search lookup to this kind of information? a form which you type the criteria in and it brings back what you can make? if i was one element away from an object could I use a wildcard function to say, if you had black you could make a house?? etc
View 3 Replies
View Related
May 9, 2013
I'm trying to implement a macro to filter through accidents to see if my company has already been hired on a particular case.
In the first form the user enters the date, location, and last name of one of the drivers. Then they click a button which opens a new form as a datasheet with accidents that match ANY of the three controls. Evidently, I need a filter that contains some form of a series of OR operators.
However, whenever I try any variation of a button that opens the second form and then applies the filter, I always get no matches.
View 12 Replies
View Related
Jul 10, 2012
i need to create a system that can search data using keyword.so i want to create search button that i will create it at form. currently i have 1 table and in that table i have 10 fields which are project_name, doc_ref_no, doc_title, volume, book_no, author, doc_status, box_barcode, filling_location, doc_availability.
i have create 2 forms, one form for user to add new record and another one is to search record. the user can search by enter project name, doc title, volume and box barcode. for project name and volume, i use combo box and for doc title and box barcode i'm using text box.
i want to create search function that can detect from user keyword and even user did not fill in all the form, the system still can search the record.
View 5 Replies
View Related
Sep 1, 2006
Not sure where to post it, though what I have in mind is similar to a query.
Basically, I want it to look like a web search engine.
You know, you enter a search phrase, and it returns a list of results where it finds matches.
So, just like that, I want it to search through a table and return all the entries where it found a match in a query. I think someone must have wrote something like this by now. Anyone know where I can find the code?
View 2 Replies
View Related
Sep 17, 2011
I want to be able to have a report automatically generate at the beginning of each month and save it as a PDF file and have that report saved to my access database.
View 3 Replies
View Related
Apr 3, 2013
I have a tabular form that lists all the records (address book). I'm trying to have a combo box filter the records by selecting a contact type (employee, supplier, customer). So far I have the contacts displaying in the combo box.I've tried to create a macro that begins "after update". Its an ApplyFilter macro.
Where Condition = [Contact Type]=[Contact Type Select]
[Contact Type Select] is the combo box.
When I do this, a popup box appears. When I type in the item I want, it works. I want this done automatically.
View 1 Replies
View Related
Sep 29, 2006
Friends,
I'm using a search string to filter a continuous form. In an attempt to duplicate "Google", I'd like to use a single search field for multiple criteria.
Is there a way to use the space bar as an "OR" event in my search string?
example: my fat head
would look like: "My" OR "Fat" OR "Head"
I presently use code which strings together multiple search fields with an AND. Here's what I've been using:
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.txtLocation) Then
strWhere = strWhere & "([Location] Like ""*" & Me.txtLocation & "*"") AND "
End IF
If lngLen <= 0 Then
strWhere = Left$(strWhere, lngLen)
Forms!frm_SearchSortEvents.filter = strWhere
Forms!frm_SearchSortEvents.FilterOn = True
End If
End Sub
Thanks for you input!
View 2 Replies
View Related
Nov 3, 2005
Hello,
I have data that looks like this:
blahblah-need
blah-aneed
blahblahblah-aaneed
I would like to have everything right of the dash to get:
need
aneed
aaneed
I have used mid and instr to get the left hand stuff. I've tried to modify to get the data to the right of the dash and I am lost.
Your help appreciated.
View 11 Replies
View Related
Jul 10, 2012
I think what I want is:
1 table(1): record of people & contact details
1 table(2): list of events with check box's with the names of people from the other table
1 report: listing how many events people have attended.
When I add a new person to table 1 I want a field to be added to table 2 in the form of a checkbox, also when I delete this person I want this field to be deleted in table 2.how to make this an automated process.
View 1 Replies
View Related
Apr 4, 2014
I have a situation where I have a report which I will generate to print our companies pricebook. I need an index/table of contents for customers to go to the page where a product is to look up prices. The problem is that we add and subtract products on a consistent basis.
So a new product will get added, but of course, to run alphabetically, there's no way to insert it, then renumber the pages for it to be easily found.to use a maketable query, which sorts all of the products alphabetically. Each time it is run, it will delete the previous table. I then need to have an autonumber field created to create my "page numbers". Yes, each time the pricebook is run, products can and will oftentimes get new page numbers.
So my thought is to have a macro run which creates the autonumber field to the table. This will then be the basis for the form, which will in turn utilize the "page number"/autonumber field to both serve as page numbers in the report. And of course, the table which is created each time will be the "table of contents".
View 5 Replies
View Related
Jun 20, 2005
I need to break up part of the value in one of my fields. I can do it in Excel by identifying the position of the dash with eg. =FIND("-",D13) And then using it in a LEFT function. Or using the text to Columns wizard.
How can I do it in a query, there is no find function. If there is an equivelant what is it?
Sample data:
22DF-RED
33AF-0
44TG-Blue
I need only the data to the left of the Dash
Thanks
Ziggy
View 2 Replies
View Related
Sep 20, 2014
So the field shows the account number as 00000000234342001.
I need it to display in the query as 234342-001.
In design view I am using Account Number: VAL([MST1_CAV_MBRDETL.ACCTNUM]) to remove the leading zeros.
But I am unsure about the rest.
In addition to this answer, how to manipulate strings and numbers to do this kind of thing? Like pull the first 3 characters and so on.
View 7 Replies
View Related
Feb 10, 2006
Can someone give me an easy way to put a hyphen between two numbers, such as with wins and losses of teams? I want it to come out 5-3, not 5 3.
I tried entering a text box with no success.
View 3 Replies
View Related
Mar 18, 2006
I cant get the comment feature to work in SQL. If I type the following...
Code:SELECT * FROM tblMembers WHERE OrderNo='xxxx' -- Finds the member
An error message is returned saying 'Syntax Error (Missing Operator)'. What am I doing wrong?
View 6 Replies
View Related
Jan 7, 2015
In Access 2007 is it possible to alter a macro so I can print 2 copies of a report. I have created a simple macro which opens up a report based on a value in a data entry form. I want to automatically print 2 copies of the report. Is this possible....
View 1 Replies
View Related
Jul 21, 2015
I have contract notes files in .xls format towards sale of equity shares from the brokerages. I have to do some editing in these files like deleting some rows, adjusting width of columns and inserting date of contract.
a) Contract-A.xls shows original file.
b) Contract-B.xls shows modified file
c) VBA macro code used for deleting rows and modifying column width is shown in modify_contractnotes.xlsm file.
d) Presently I open the file and copy and paste the contents on the macro-enabled workbook sheet . After macro operation I transfer back the contents by copy and paste to a master file(Contract-C.xlsx) and clear the contents in the macro enabled workbook to make it ready for another operation.
e) It is time consuming process for around 60 files per month.
f)After this operation I run RDBMerge add-in to consolidate and normalize all these files in a directory. RDBMerge smoothened out merged cells also.
Is it possible to have a macro-enabled workbook open all the time and the contract files be opened one after other and macro contained in macro enabled workbook by modifying its code suitably operate on these contract files.
Files are attached in modify_contractnotes zipped folder.
View 4 Replies
View Related
Jan 11, 2012
I need to import 15 csv files into access every month. I have location of all those files listed in a table in the same access DB but i'm not sure how to incorporate them in a macro I have written to import one of those files:
Function Macro_TransferCsvFileTo_RatesTradeData()
On Error GoTo Macro_TransferCsvFileTo_RatesData_Err
DoCmd.TransferText acImportDelim, "Import_Spec_tbl_RatesData", "tbl_RatesData", "c:Documents and SettingsaggauraDesktopWIPXMLDB_JOH_FI_2011123 0.csv", True, ""
[Code] ....
where c:Documents and SettingsaggauraDesktopWIPXMLDB_JOH_FI_2011123 0.csv is the file name I want to be replaced by each of the file listed by me in the other access table.
View 3 Replies
View Related
Jun 9, 2013
I have a table field that contains a lot of part numbers in different format. One could be with hyphen while others are without hyphen.
record#1 : 4535-300-34567
Record#2: 453530034567
Record#3: 4535-301-56721
In this case record# 1 & 2 are same part number only difference is hyphen.
I want to set my query parameter [Enter part number] such a way, when some one enter 453530034567 it should pull both the record (record#1 & 2).
View 5 Replies
View Related
May 18, 2013
I have a series of dates that I inherited from former DB. Some of the dates are Mon-Fri, Mon-Thu, Sun-Fri, etc. That is, there is a hyphen "-" in the middle of the text. I have an unbound control with an IIF statement using the LIKE condition, I just get an error. I tired the following to no avail. Using Access 2010.
IIF([Day1] Like "*-*", 5, 1)
IIF([Day1] like "-", 5, 1)
IIF ([Day1] like '-', 5, 1)
IIF ([Day1] like [-], 5, 1)
I've looked it up and the hyphen _ is used as a wild card character, but I need to include it just as a dash.
View 3 Replies
View Related
Sep 21, 2004
I am trying to create a simple Search form in Access where a user can select a desired record and query multiple tables using the inputs.
I would like them to be able to query Retailers, Distributors and Products.
The 6 tables are linked as follows:
Although some of these tables are not included in the query, they are required to ensure relationships.
Retailers -- Uses (RetailerID,DistributorID) -- Distributors
Retailers -- Orders (RetailerID,ProductID) -- Products
All retailers have at least one distributor BUT a retailer may or may not have ordered any products.
I have created my form but the query linked to the form is having some trouble. It is only selecting those records that have ordered products. For example, if I query a retailer name only and it does not have any ordered products, it will not display. Is there a problem with the table joins? The SQL for the query is displayed here:
Code:
View 5 Replies
View Related
Aug 19, 2004
I have a macro setup that deletes all the records in 2 different tables, then using about 8 queries, appends several records to the two tables where data was deleted. When these macros run, several Yes/No/Cancel dialog boxes come up for each query, first asking you if you are sure you want to do this, that it is going to change data in my table, and then second telling me how many records it's going to append or delete.
Is there a way to make it automatically run Yes to all of these dialog boxes? That would really help out a whole lot. Of instead of that, but maybe some sort of VB code that could do all the deleting and appending without the need of the Macros, and that doesn't require user intervention. I have my Macro's setup on the "On Click" event in a form, so using VB would be no problem at all.
Any Suggestions?
View 10 Replies
View Related
Jul 12, 2005
Hello all,
I have always been wondering why this happens, and now I have a problem with it.
When I export a Table/Query from Access to Excel (be it with Right CLick -> Export...or TransferSpreadsheet) there is an apostrophe character (') appended to the front of some/each cell in Excel. You cannot see it immediately, but when you click on the cell, there is this character. WHY? Does anyone else have experience in this? :confused:
Thanks in advance.
View 3 Replies
View Related
May 4, 2015
I have been doing an exercise to split the data from the list of the information into column A, B & C. Unfortunately the data value that i have consist of several set of data format therefore it create an issue for me to separate the information in Access 2010 easily.
eg.
Original Data Field
FLRY-B-0.75-L-GY
FLRY-4.0-V-R
VTAC-GY 19X20
COT-F2-5-DL
Actual Data To Populate Into Column A, B & C should be the following :
A
FLRY-B
FRY
VTAC-GY
COT-F2
B
0.75
4
19X20
5
C
L-GY
V-R
(No data captured for this column)
DL
View 14 Replies
View Related
Dec 21, 2005
I have an extremely large database which is in a continuous form format, and what I would like to happen is, instead of using the find button that would just find a word, I would like to have a pop-up search box that would yield actual texts throughout the DB (something like the search feature in Adobe Acrobat). In addition, I would like to use the "and" or "plus" together to search for additional data if needed. Please, unless there is a sample I could download and use in my db, please be specific in your instructions since I am new to all this.
Thanks!!
View 1 Replies
View Related