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 Replies


ADVERTISEMENT

Modules & VBA :: SQL To Copy Field Contents With Reserved Characters

Jul 11, 2013

I've got some code that loops through a record and copies the non-null fields to another record. This is the partial code:

For Each fld In tdf.Fields
If Not IsNull(Forms!contact_lookup![Contact_sub subform1].Form(fld.NAME)) Then
strSql = "UPDATE tbl1 SET tbl1.[" & fld.NAME & "] = '" & Forms!contact_lookup![Contact_sub subform1].Form(fld.NAME) & "' " & _
"WHERE tbl1.[FC_APN] = '" & Me.txtApn & "';"
DoCmd.RunSQL strSql
End If
Next fld

This works fine until it encounters a field whose contents has a reserved character, like a single quote (" ' ") in it, for example, "What's the what." At that point the SQL thinks there's a " ' " missing in the statement, and I get an error 3075 (syntax error: missing operator).

View 2 Replies View Related

Reserved Words

May 11, 2005

Hi all,

Does anyone have a definitive list of reserved words in Access? I understand certan words are reserved because they cause a problem when using vba. Is this correct?

It would make sense because I used to have a field called "Name" and my controls never worked correctly. I have since changed this and all is ok.

I have searched Access help files and this forum, but am unable to find a complete list other than the odd one like name, date, group etc.

Any help would be great. Many thanks.

View 3 Replies View Related

Reserved Error (-1517)

Nov 4, 2005

A query that I have been running without error for months has suddenly failed. When I try to run it I get this error message:

Reserved error (-1517); There is no message for this error

The query is

INSERT INTO DISPUTESPortal
SELECT DISPUTES.*
FROM DISPUTES;

Like I said, this has worked for months, but just started failing the other day. Neither table's layout has changed.

Any idea what this error is, and how to get my query working again?

Thanks,
David

View 1 Replies View Related

MS Access Reserved Error (-1517)

Jan 29, 2007

WTF does this mean?

ugh

nothing on google with this error message

thanks

sportsguy

View 6 Replies View Related

Tables :: Generating Monthly Report - Reserved Error 1524

Mar 12, 2013

i have a table on my database from which i generate a monthly report by running a query. when i run the query (date from to date to) i have no problem. it shows me all the relevant records. when i want to generate a report, i input the start date and the closing date for the report. it then gives me an error (reserved error (-1524); there is no message for this error.) i have gone into the table and basically isolated all the corrupted entries. there are 359

what i need to know is how to repair these entries without losing the information. im new to access and this is a simple(kinda) database which i set up to keep track of what the staff in my department are doing on a daily basis.

im running access 2007.

View 7 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

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 2 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

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

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

Reserved Error (-1517); There Is No Message For This Error.

Mar 31, 2006

Does anybody know what this error message refers to?

"Reserved Error (-1517); there is no message for this error."

It just started happening today, and I haven't even made any changes to the database. It occurs when I hit a button I have to run a macro.

the macro does the following:
1) Shows all records
2) Requery
3) ApplyFilter.
The Where Condition for the filter is:
Right([tblContracts].[JobNum],4)=Right([Forms]![FrmContProc].[txtFindJobNum],4)

The weird thing is that it only occurs if the Form window is taller than 1/2 of my viewable area. If the Form window is 1/2 the viewable area or shorter, it works OK. This was running fine earlier today, but about 4:00 pm (03/31/06) this started happening.

If anybody knows what this error means, or how to get rid of it (I really need to use this window in full-screen) then please let me know.


-Thanks, Sean

View 10 Replies View Related

"Reserved Error -1517"

Mar 5, 2006

insert words that are not for public . . . .

I have a large text file, 800 megs,
354000 records. . .

and when i run the following query . . .


INSERT INTO ACEimport ( CustomerID, ContractID, ContractModifier, ContractLine, ServiceProgram, Invoice, InvoiceLine, InvoiceDate, TransactionType, EffDate, EndDate, Duration, UOM, AcctRule, BillCycle, BAMA, EOPBillFlag, Product, CValue, InvoiceTotal, RevenueTotal, GLDate, InvoiceLineTot, ContractLineTot )
SELECT Xrevenueoracle.CustomerID, Xrevenueoracle.ContractID, Xrevenueoracle.ContractModifier, Xrevenueoracle.ContractLine, Xrevenueoracle.ServiceProgram, Xrevenueoracle.Invoice, Xrevenueoracle.InvoiceLine, Xrevenueoracle.InvoiceDate, Xrevenueoracle.TransactionType, Xrevenueoracle.EffDate, Xrevenueoracle.EndDate, Xrevenueoracle.Duration, Xrevenueoracle.UOM, Xrevenueoracle.AcctRule, Xrevenueoracle.BillCycle, Xrevenueoracle.BAMA, Xrevenueoracle.EOPBillFlag, Xrevenueoracle.Product, IIf(IsNull([ContractValue]),0,[ContractValue]/100) AS CValue, IIf(IsNull([InvoiceAmt]),0,[InvoiceAmt]/100) AS InvoiceTotal, IIf(IsNull([RevenueAmt]),0,[RevenueAmt]/100) AS RevenueTotal, Xrevenueoracle.GLDate, IIf(IsNull([InvoiceLineAmt]),0,[InvoiceLineAmt]/100) AS InvoiceLineTot, IIf(IsNull([ContractLineAmt]),0,[ContractLineAmt]/100) AS ContractLineTot
FROM Xrevenueoracle
WHERE (((Xrevenueoracle.GLDate)>#1/28/2006# And (Xrevenueoracle.GLDate)<#3/5/2006#));


I get the reserved -1517 error, i have compacted and repaired the destination file, and i have scrolled through with a query and can't find it. . .

Before inserting the Null, i used to get another error of Numeric Overflow. . . and i was hoping that the null error handling would get rid of it. . . but no such luck. ..

any suggestions oh wiser ones?

thanks

sportsguy

View 1 Replies View Related

General :: Open Word Document With Corresponding Data Filled From Text Field Of A Form

Jul 10, 2013

I am trying to open a word document with corresponding data filled from the text field of a form. I managed to get the word document but I don't know how to give a variable in word document.

View 2 Replies View Related

Modules & VBA :: Moving Rich Text From Access Memo Field To A Word Text Box

Jul 24, 2015

We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.

Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)

View 2 Replies View Related

Forms :: Change Text Color On A Form If Text In Field Contain Certain Word

Jul 12, 2013

I have a Form Display Data in my Access Database, which is working really well. However, users was asking if there is a way we can make Font Color Could/would change if The text in A field or Any field in my display form contained the word "SAD or MAD". Is there code for such thing in display form?..

View 3 Replies View Related







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