Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2005

Tip: Looking for answers? Try searching our database.

SQL to Insert text fields problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Blair - 09 May 2005 02:04 GMT
I'm using Access 2K. I have a concatenation function which creates a memo
field.  I'm trying to write the resulting values to tblFN_Children.  The
three values are:

    FN - string which represents the file number with the format "NN-NNN"

    NamesDOB - Memo which is the string created from the execution of the
concatenation function

    i - Integer which is the count of the number of children in this FN

All works well until I get to the Insert.  My command is

DoCmd.RunSQL ("INSERT INTO tblFN_Children ( FileNumber, Children,
NumberofChildren ) " & _
" SELECT '" & FN & ",' '" & NamesDOB & ",' " & i)

When I Debug, the values for FN, NamesDOB and i are correct, it seems to be
that my SELECT statement is not in the correct syntax, but I'm lost.
I'm getting a runtime #3075 error - Missing operator.

What am I doing wrong?
Douglas J. Steele - 09 May 2005 02:35 GMT
Your ",' '" and ",' "  appear to be incorrect.

They should be "', '" and "', "  (where, exagerated for clarity, that's " '
, ' " and " ' , ")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> I'm using Access 2K. I have a concatenation function which creates a memo
> field.  I'm trying to write the resulting values to tblFN_Children.  The
[quoted text clipped - 19 lines]
>
> What am I doing wrong?
Robert Blair - 09 May 2005 02:48 GMT
Douglas:

That did it.  Mucho Gracias me amigo.

Robert
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.