A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

simple syntax issue



 
 
Thread Tools Display Modes
  #1  
Old February 25th, 2010, 02:24 PM posted to microsoft.public.access.queries
mark kubicki
external usenet poster
 
Posts: 84
Default simple syntax issue

I'v blind this morning to an error in the syntax of my code.. if somone
would please take a look over my shoulder and redline the error...
many thanks in advance,
-mark

Type = text
PrintCatalogSheet = Yes/No
BaseCatalogSheet = Yes/No
CatalogSheetLink= Hyperlink
PrintOrder = Number
IsDetailSheet = Yes/No


Dim sSQL As String
sSQL = "INSERT INTO tbeAdditionalPages (Type, PrintCatalogSheet,
BaseCatalogSheet, CatalogSheetLink, PrintOrder, IsMountingDetail) " & _
"VALUES (" _
& " ' " & Forms![frmSpec].[Type] & "', " _
& true, _
& false, _
& "#'" & CatalogSheetLink & "',"_
& " vPrintOrder, " _
& false _
& ");"
CurrentDb().Execute sSQL, dbFailOnError
Forms![frmSpec].chldFixtureCuts.Requery


  #2  
Old February 25th, 2010, 04:17 PM posted to microsoft.public.access.queries
NuBie via AccessMonster.com
external usenet poster
 
Posts: 67
Default simple syntax issue

& "# ' " & CatalogSheetLink & "',"_


should it be?

& " ' # " & CatalogSheetLink & " ',"_


Mark Kubicki wrote:
I'v blind this morning to an error in the syntax of my code.. if somone
would please take a look over my shoulder and redline the error...
many thanks in advance,
-mark

Type = text
PrintCatalogSheet = Yes/No
BaseCatalogSheet = Yes/No
CatalogSheetLink= Hyperlink
PrintOrder = Number
IsDetailSheet = Yes/No

Dim sSQL As String
sSQL = "INSERT INTO tbeAdditionalPages (Type, PrintCatalogSheet,
BaseCatalogSheet, CatalogSheetLink, PrintOrder, IsMountingDetail) " & _
"VALUES (" _
& " ' " & Forms![frmSpec].[Type] & "', " _
& true, _
& false, _
& "#'" & CatalogSheetLink & "',"_
& " vPrintOrder, " _
& false _
& ");"
CurrentDb().Execute sSQL, dbFailOnError
Forms![frmSpec].chldFixtureCuts.Requery


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201002/1

  #3  
Old February 25th, 2010, 06:24 PM posted to microsoft.public.access.queries
mark kubicki
external usenet poster
 
Posts: 84
Default simple syntax issue

got it... it should read:

sSQL = "INSERT INTO tbeAdditionalPages (type, printCatalogSheet,
BaseCatalogSheet, CatalogSheetLink, PrintOrder, IsMountingDetail) " _
& " Values(" _
& "'" & Forms!frmSpec.Type & " ', " _
& "true, " _
& "false, " _
& " ' # " & CatalogSheetLink & " ', " _
& vPrintOrder & ", " _
& "false" _
& ");"
CurrentDb().Execute sSQL, dbFailOnError



"NuBie via AccessMonster.com" u42912@uwe wrote in message
news:a42b03632daae@uwe...
& "# ' " & CatalogSheetLink & "',"_


should it be?

& " ' # " & CatalogSheetLink & " ',"_


Mark Kubicki wrote:
I'v blind this morning to an error in the syntax of my code.. if somone
would please take a look over my shoulder and redline the error...
many thanks in advance,
-mark

Type = text
PrintCatalogSheet = Yes/No
BaseCatalogSheet = Yes/No
CatalogSheetLink= Hyperlink
PrintOrder = Number
IsDetailSheet = Yes/No

Dim sSQL As String
sSQL = "INSERT INTO tbeAdditionalPages (Type,
PrintCatalogSheet,
BaseCatalogSheet, CatalogSheetLink, PrintOrder, IsMountingDetail) " & _
"VALUES (" _
& " ' " & Forms![frmSpec].[Type] & "', " _
& true, _
& false, _
& "#'" & CatalogSheetLink & "',"_
& " vPrintOrder, " _
& false _
& ");"
CurrentDb().Execute sSQL, dbFailOnError
Forms![frmSpec].chldFixtureCuts.Requery


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201002/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.