Find First Word In Field From Query

Feb 15, 2007

Can anyone help me in creating a field from a query which will pull the first word only from a specific field.



Thanks.

View Replies


ADVERTISEMENT

Find A Word In A Memo Field Query

Jul 31, 2007

Hello,

I asking to see if it is possible to run a query on a memo field. For an example I want to pull all records where the memo field contains the word "Test".

Is this possible?

Thanks!

Fen

View 1 Replies View Related

A Word Find Can't Find

May 23, 2005

A customer's name is SZEE. Seek him through the SName textbox with Find, and Access can't find him. (Same in the table.) Seek him with a wildcard Sz* and there he is.

I've tried it on another machine - also with Access2k - and it's the same.

Is it an Access quirk? Is there an answer? (The client asks why. Be good to be able to say.) Cheers.

View 3 Replies View Related

Queries :: How To Find If Memo Contains A Specific Word

Mar 18, 2015

I need to find whether a memo field contains a specific word. I know how to find whether it contains a specific string.

Let's say I am looking for the word "run." I would not want a positive result when searching "I don't like gerunds," but I WOULD want to find the records with "I know how to 'run' a search."

So I am looking for WORDS, not matching strings.

I am perfectly willing to use a user-defined function, to put involved processing into the query, such as

Code:
...
WHERE FieldHasWord("run", memoField) = True
AND ...

View 3 Replies View Related

Find Newest Record, Close Word & Not In List

Jul 5, 2005

I've almost completed the DB I'm working on, but still have a few loose ends to tie up that I can't seem to figure out. I've spent many hours already on this forum searching for solutions, and have tried a few different things, but I still can't work out these bugs.

First, I need my form to open with the latest records filtered first, so that the most recently added records will be easiest to find and edit. I'm not sure how exactly to do this. I've tried a run query when the form is opened, but I still need all the records displayed or accessible. The form is called frmDenial, and I would like it to be looking in the DateLogged field of the form. Any suggestions?

Second, I have command buttons that will export data in the fields to MSWord Templates via bookmarks. The button runs well by opening the document, inserting the data, and printing. I have also tried several different code syntax to close word once it is done, but it is still staying open after printing. Here is a sample of the code:
________________________________________
Private Sub Print_Letter_Click()
Dim objWord As Word.Application
'Start Microsoft Word 2000.
Set objWord = CreateObject("Word.Application")
With objWord
'Make the application visible.
.Visible = False
'Open the document.
.Documents.Open ("G:PharmacyPrior Auth Docs and DataRevised Pharmacy Denial ProcessesKAN Not Nec or Benefit2.dot")
'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("bmkFirstName").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRFirst))
.ActiveDocument.Bookmarks("bmkLastName").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRLast))
.ActiveDocument.Bookmarks("bmkHRN").Select
.Selection.Text = (CStr(Forms!frmDenial!MemberNumber))
.ActiveDocument.Bookmarks("bmkAddress1").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRAddress1))
End With
Print_Letter_Click_Err:
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
End If
objWord.Application.Options.PrintBackground = False
objWord.Application.ActiveDocument.PrintOut
objWord.Application.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit Microsoft Word and release the object variable.
objWord.Quit
Set objWord = Nothing
Exit Sub
End Sub
_______________________________________

Finally, I have two cascading combo boxes set up that will auto pop related fields based on the selection made. But, if an item is not in the list, I would like the user to add it to the linked table to appear in the list. I also have this working well, with a pop up asking the user if they want to make the addition, type in the new item, and add to the list without requiring the user to refresh or exit then re-enter the form. But it will only add the item name, and not the item description (another field in the form and another column in the table). How can I modify the code to prompt the user to enter these other details? I can link it to a pop up sub form to enter the data, but if possible, would rather the boxes pop up to have the user type in the data. Here is the code I have so far in the NotInList Event...
__________________________________________
Private Sub DrugName_NotInList(NewData As String, Response As Integer)
Dim DB As DAO.Database
Dim rs As DAO.Recordset
Dim strMsg As String
strMsg = "'" & NewData & "' is not an available Drug" & vbCrLf & vbCrLf
strMsg = strMsg & "Do you want to add the new Drug to the current Database?"
strMsg = strMsg & vbCrLf & vbCrLf & "Click Yes to add or No to re-type it."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Add new model?") = vbNo Then
Response = acDataErrContinue
Else
Set DB = CurrentDb
Set rs = DB.OpenRecordset("tblDrug", dbOpenDynaset)
On Error Resume Next
rs.AddNew
rs!Drug = NewData
rs.Update
If Err Then
MsgBox "An error occurred. Please try again."
Response = acDataErrContinue
Else
Response = acDataErrAdded
End If
rs.Close
Set rs = Nothing
Set DB = Nothing
End If
End Sub
______________________________________________
The two other colums in the tblDrug that I need the user to be prompted to fill are Denial Reason (column 3) and Alternative (column 4). What would be the best way to accomplish this?

I would really appreciate any help or suggestions with any of these problems. Thank you so much! :o

View 7 Replies View Related

Forms :: Search Text Box For Specific Word - Find Option

Sep 18, 2013

I have 5 textboxes and a multiline textbox in a form in my Access Database. I am going to type several keywords in those textboxes and I am going to type an article in the multiline textbox.

What I need to do is I want to calculate the keyword density in the article. I can do that if i know how to search the whole text in the article and count the specific word. And I want a function to count all the words in the article too.

View 1 Replies View Related

Is There A Way To Use A Reserved Word In A Field Name?

May 10, 2005

Hi!

In the field names of my table, I have one field called Group. However, it is a reserved word in MS Accesss. My question is: Is there any way that we can use a reserved name in a field name?

Please advise,

Regards,

Aijun.

View 5 Replies View Related

How To Match 4 Character Word Or Number Or Combination By Identical 4 Characters Word

Apr 11, 2013

How to match 4 character word or number or combination by identical 4 characters word or number or combination in one word have 10 or 15 characters.

I have to two separate tables (Table A and Table B). Table A has one column (Tag No) and Table B has about 15 columns with one column name Tag No as below

Table A

Table B

Tag No

Tag No

2009

ZZZ-2030-DC

2010

ZZZ-2010-M9P

[code]....

They're both in MS Access.I am trying to match 2 tables - columns (Tag No) with join query, but not success. I want to match 4 characters in Table-A with 4 similar characters in Table-B (Tag No) cell.What query is suitable to compare two tables.

View 8 Replies View Related

Exporting Field Value To A Word Document

May 31, 2005

Hi.

I'd like to export only email addresses separated by ";" to a word document based on a result of a query.
Query gets build dynamically in VB behind the form as there are many search criterias. so user can eneter one field or many in the form to build the query. Queries work and i can extract and display the email in a report or another form, but now i'd like to export it to a word document or outlook (but i would prefer word).

Can anyone please give me advice how i should approch this issue.

Thank you.

View 8 Replies View Related

Word Wrapping Field Name On Form

Aug 25, 2015

Is it possible to apply word-wrap to a lengthy field name on a Form. Due to a lengthy field name the corresponding column is too wide.

View 1 Replies View Related

Edit RTF Memo Field In Word

Aug 11, 2011

I am building a database application, in which the users desire to use Word to Edit and change the RTF memo field of a particular table. I know how dump access rtf information to Word. Is there a way to pull it all back from the word application? Maybe some way to create a submit/close button that sends the data back?

View 2 Replies View Related

Passing Date Field To Word Document

May 16, 2005

Hi,

I have a control on a form which opens up Word and completes fields in the Word document with data on the form. It basically fills in an invoice form.

Everything works ok apart from when the invoice date and order date fields are passed. In the tables and in the forms, the dates are in Long Format ie '17 May 2005'. However, when they are apssed to the Word document, they are in a shortened format ie '17/05/05'. I am required to show the Long Format but am at a loss to find out how to achieve this.

I use bookmarks in the Word document and the code on my form relating to these fields are:

.ActiveDocument.Bookmarks("OrdDate").Select
.Selection.Text = (CStr(Forms!frmOrders!OrdDate))
.ActiveDocument.Bookmarks("OrdDateInv").Select
.Selection.Text = (CStr(Forms!frmOrders!OrdDateInv)

The Word document cannot be changed as far as I can see. I believe the answer could be to change the code above to change the format, but cannot get anything to work?

Your assistance would be helpful.

Thanks

View 1 Replies View Related

Searching For Any Word In A Memo Field On ASP Page

May 1, 2008

Hi there, I am currently working on our intranet at work and am creating an Access database so we can record all of the box files at our storage facility.

One of the fields is called 'contents', which is a Memo field, where the person who is inputting the data will describe what is in the box. They will then use the autonumber generated by the database to label that box.

That way we can locate the boxes much easier than at the moment.

I have created a results page with a search box at the top using ASP in Dreamweaver CS3 and it works fine if I replicate EXACTLY what is written in the contents memo field.

ie: if the contents field for record number one reads

'Archived box of insurance documents dating back to 1999'

I would need to type in that exact phrase to pull that info back.

What I want it to do is if I was to put in '1999' or 'insurance' then it would return the same result (and others with those specific words).

What do I need to do in my code?

Here is the current code

Code:<%Dim rs__MMColParamrs__MMColParam = "1"If (Request.QueryString("content") <> "") Then rs__MMColParam = Request.QueryString("content") End If%><%Dim rsDim rs_cmdDim rs_numRowsSet rs_cmd = Server.CreateObject ("ADODB.Command")rs_cmd.ActiveConnection = MM_intranet_STRINGrs_cmd.CommandText = "SELECT * FROM archive WHERE content = ?" rs_cmd.Prepared = truers_cmd.Parameters.Append rs_cmd.CreateParameter("param1", 200, 1, 255, rs__MMColParam) ' adVarCharSet rs = rs_cmd.Executers_numRows = 0%><%Dim Repeat1__numRowsRepeat1__numRows = -1Dim Repeat1__indexRepeat1__index = 0rs_numRows = rs_numRows + Repeat1__numRows%><%Dim MM_paramName %><%' *** Go To Record and Move To Record: create strings for maintaining URL and Form parametersDim MM_keepNoneDim MM_keepURLDim MM_keepFormDim MM_keepBothDim MM_removeListDim MM_itemDim MM_nextItem' create the list of parameters which should not be maintainedMM_removeList = "&index="If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="End IfMM_keepURL=""MM_keepForm=""MM_keepBoth=""MM_keepNone=""' add the URL parameters to the MM_keepURL stringFor Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End IfNext' add the Form variables to the MM_keepForm stringFor Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End IfNext' create the Form + URL string and remove the intial '&' from each of the stringsMM_keepBoth = MM_keepURL & MM_keepFormIf (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)End IfIf (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)End IfIf (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)End If' a utility function used for adding additional parameters to these stringsFunction MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End IfEnd Function%>



and for the search form:

Code:<form id="content_search" name="content_search" style="margin: 0px; padding: 0px;" action="archive_results2.asp"> <label> <input name="content" type="text" id="content" value="" /> </label> <label> <input name="button" type="submit" class="directory_form_button" id="button" value="Search Content" /> </label> </form>

Thanks for any help that could come my way!!

Cheers

View 2 Replies View Related

Queries :: How To Replace A Field With A Different Word Based On Its Value

Mar 15, 2013

I have a seating chart with 33 tables. Under each table there is a number that represents seats taken. I want to do a query that changes the number when it is a certain value. For example, when the value is null I want it to say "Empty", when the value is 10 I want it to say "Full" and when the value is over 10 I want it to say "Over". If the value is 1-9 I want to leave it as is.I know how to accomplish one at a time but not all three together. I've been useing:

Nz([Table#],"Empty")
IIf([Table#]=10,"Full",[Table#])
IIf([Table#]>10,"OVER",[Table#])

[code]....

View 6 Replies View Related

Queries :: Need To Remove A Specific Word From A Field

Dec 2, 2014

I have a column named "stuffno" that i should enter the id of my stuff.I should enter "no 111".I did this because some stuff dont have id's so if i make a calculated field. "No " & [stuffno]I will get in the field of stuffno1 "no " for the stuff without id..Ok now i want to make another column that contains just the id of the stuff..Is there anyway to take just the id numbet the contents of "stuffno" field without "no " so the "stuffno1" will be empty or it will contain just the id.

View 3 Replies View Related

Word :: Sizing MS Word Table To Same Size As Recordset

Aug 14, 2014

My end goal is to populate a pre-existing table in an MS Word document with records from a query. The easiest way I've found (through scouring the internet) is to start with the code below (ran during OnClick() even in Access) to get the table the same size as the recordset:

Code:
Dim wDoc As Word.Document
Dim wTable As Word.Table
Dim wCell As Word.Cell
Set wDoc = appWord.Documents.Add(strDocLoc)
wDoc.Visible = True

[Code] ....

The code will shrink the table down just fine if the table has more rows than the recordset +1 (for header column). My hangup with this is the last line ("Selection.InsertRowsBelow 5") isn't executing; rows are not being added to the table. I get no errors -- it just does nothing. I set it as "Selection.InsertRowsBelow 5" arbitrarily just to see if it would even add rows, and sure enough it's not.

View 9 Replies View Related

General :: Paste MS Word Table Into A Field In Access?

Aug 14, 2012

I'm not sure where this question belongs but I need to give users the ability to create a small table in MSWord or another program, and then paste the table into a data field. An image of the table would be fine. But it needs to be user friendly.

If that's not possible they could just create a Rich Text document with text formatted in a table form with out gridlines. I would need about a 2000 character limit. Not sure if this is reasonable or not??

View 6 Replies View Related

Modules & VBA :: Attaching Word Document To Attachment Field For Every New Record

Jan 12, 2015

I'm trying to work out how to attach a word doc to the attachment field of a table when I add a new Record. The following code work's fine if I add it to the On Load Event on the Form, but the doc is attach'd to the first record. When I add the code to the Add New Record button, I get the error msg: "File already part of the Multi-Valued Field" and nothing in the attachment field.

Code:
Private Sub Add_Record_Click()
DoCmd.GoToRecord , , acNewRec
Me.Description.SetFocus
On Error GoTo Err_AddImage
Dim db As DAO.Database
Dim rsParent As DAO.Recordset2
Dim rsChild As DAO.Recordset2

[Code]...

View 8 Replies View Related

Use Auto Complete Feature When Typing Word In Middle Of Field

Feb 26, 2014

I'm working with a DB to enter orders for picking. I have an item list that I'm linking to when entering orders, and bringing in the data from the item list such as item location etc.

It's setup right now that when I type the first couple of letters into the item field it automatically brings up the matching items and if I click enter it completes the item and brings in the other fields from the item list.

Example: If I type in 'tom' I get back 'tomato', 'tomato sauce' etc. and when I choose the right one and hit enter it fills up the rest of the required info such as item location.

What I would like it to do is have the auto complete also check for middle words.

Example: when I type 'alm' it returns 'almonds', 'almond milk', but don't return 'container almonds' or 'container roasted almonds' etc.

View 1 Replies View Related

Can Ask Access To Automatically Enter Data In A Field If A Certain Word Is Found

May 19, 2014

I have a table with 715K records. Each record is an inventory product, and the sixth field of each record is a short description. The tenth field is a single-letter category designation, and is currently blank. What I want to do is search through the description field of every line, and where the word "Paint" is contained, enter a letter "P" in the category field.

View 2 Replies View Related

Cannot Find Field Name, Pls Pls Help

Jun 14, 2006

I am desinging a report, I cannot see some fileds in Sorting and grouping. The query that I am runing has those fieds, How can I get to see all the fileds in sorting and grouping?

Thanks

View 1 Replies View Related

Trying To Find A Field

Apr 26, 2005

When opening a form i get asked for a parameter value for a field that has been deleted. it obvioulsy still exists somewhere but I cannot find it. i have analysed performance, all tables, forms and queries but it doesn't come up with this filed anywhere. the field name has even been spelt wrong so i thought it would be easy to track! Help - what else can i do to find where this parameter is being called from??

View 4 Replies View Related

Queries :: Find Field Name Not Field Value?

Mar 11, 2014

I'm trying to convince Access to find a value and then convert said value into the name of the field it came from.

Below is my current code:

Code:
LowestMark:
Minimum([AvgOfOpening1],[AvgOfConfidentiality1],[AvgOfEmail1],[AvgOfTenureStatement1],[AvgOfOwnership1],[AvgOfClearExplanation],[AvgOfProbing1],[AvgOfUseofTools1],[AvgOfResolveBeforeS2S1],[AvgOfBridgeSolutions],[AvgOfSummarizeWrapUp1],[AvgOfOfferFurtherAssistance1],[AvgOfOneFaceOneVoice1],[AvgOfAppreciateBrandCox1],[AvgOfInteractwithCustomer1])

(Minimum is from a module that finds the lowest value in the list.)

I need my query to tell me which field gives that value.

Example:

Agent Name AvgOfEmail1
instead of:
Agent Name 41.7%

how to make this work?

View 6 Replies View Related

How Do You Find The Most Common Value In A Field

Mar 27, 2008

I am OK with a number field as I can put it in Excel and use =Mode().

But that wont do text such as lastname, suburb etc. I can do suburb by doing postcode but no such equivalent from some others I want to do

View 4 Replies View Related

How To Find Out All The Tables Contain A Particular Field

Jul 3, 2006

i want to find out all the tables that contain a particular field. eg.employee_ID exists in employee table and other tables, how i can find out what are the other tables? can i run a search query to do this?

View 2 Replies View Related

Find A Field In A Form

Aug 28, 2006

I am trying to locate a field in the form. The field is existing in the Tab Order list. But when I use the tab to locate the field in design or run mod, the tab never jump to that particular field.

Can anyone tell me how I can locate the field (in order to change the properties of this field)?

View 1 Replies View Related







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