insert record action truncating memo field data

M

Mark Kubicki

I have this sub behind a command button on a form. Its purpose is to add a
set of records to one table [tblInstallationNotes] from a second table
[qryInstallationNotes ] that match a criteria....
- the filed [InstallationNote] in the 1st table, and the field [Options] in
the 2nd both have memo type data defs

the correct records append; however, they truncate (presumably at that
infamous 255 character limit)

I've found some stuff on the web about aggregation, de-duplicating and
formatting, but none of this seems to apply.
Any suggestions would be welcome; and as always, thanks in advance,
mark


Private Sub cmdRestoreBaseInstallatonNote_Click()
Call DoSQLRestoreBaseInstallationNotes(Me)
Me.Requery
End Sub


Public Sub DoSQLAddBaseInstallationNotes(frm As Access.Form)
Dim sSQL As String
sSQL = "INSERT INTO tblInstallationNotes(Type, PrintInstallationNote,
BaseInstallationNote, InstallationNote) " _
& "SELECT '" & frm.Type.Value & "', false, true, [Options] " _
& "from qryInstallationNotes " _
& "WHERE [Manufacturer] = '" & frm.Manufacturer.Value & "'" _
& " and [CatalogNumber] = '" & frm.CatalogNo.Value & "';"

DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True
End Sub
 
J

John W. Vinson

I have this sub behind a command button on a form. Its purpose is to add a
set of records to one table [tblInstallationNotes] from a second table
[qryInstallationNotes ] that match a criteria....
- the filed [InstallationNote] in the 1st table, and the field [Options] in
the 2nd both have memo type data defs

the correct records append; however, they truncate (presumably at that
infamous 255 character limit)

I've found some stuff on the web about aggregation, de-duplicating and
formatting, but none of this seems to apply.
Any suggestions would be welcome; and as always, thanks in advance,
mark


Private Sub cmdRestoreBaseInstallatonNote_Click()
Call DoSQLRestoreBaseInstallationNotes(Me)
Me.Requery
End Sub


Public Sub DoSQLAddBaseInstallationNotes(frm As Access.Form)
Dim sSQL As String
sSQL = "INSERT INTO tblInstallationNotes(Type, PrintInstallationNote,
BaseInstallationNote, InstallationNote) " _
& "SELECT '" & frm.Type.Value & "', false, true, [Options] " _
& "from qryInstallationNotes " _
& "WHERE [Manufacturer] = '" & frm.Manufacturer.Value & "'" _
& " and [CatalogNumber] = '" & frm.CatalogNo.Value & "';"

DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True
End Sub

Please post the SQL view of qryInstallationNotes. IS this in fact a table? or
is it (as the name implies) a query? If its a query might it be causing the
truncation?
 
M

Mark Kubicki

you are correct, it is indeed a query [qryInstallationNotes ]

the code behind it is:

SELECT FixtureCatalogsInstallationNotes.Manufacturer,
FixtureCatalogsInstallationNotes.CatalogNumber, OptInstallationNotes.Options
FROM FixtureCatalogsInstallationNotes INNER JOIN OptInstallationNotes ON
FixtureCatalogsInstallationNotes.OptionNumber =
OptInstallationNotes.optionNumber;

------------------------------------------------------------
John W. Vinson said:
I have this sub behind a command button on a form. Its purpose is to add
a
set of records to one table [tblInstallationNotes] from a second table
[qryInstallationNotes ] that match a criteria....
- the filed [InstallationNote] in the 1st table, and the field [Options]
in
the 2nd both have memo type data defs

the correct records append; however, they truncate (presumably at that
infamous 255 character limit)

I've found some stuff on the web about aggregation, de-duplicating and
formatting, but none of this seems to apply.
Any suggestions would be welcome; and as always, thanks in advance,
mark


Private Sub cmdRestoreBaseInstallatonNote_Click()
Call DoSQLRestoreBaseInstallationNotes(Me)
Me.Requery
End Sub


Public Sub DoSQLAddBaseInstallationNotes(frm As Access.Form)
Dim sSQL As String
sSQL = "INSERT INTO tblInstallationNotes(Type, PrintInstallationNote,
BaseInstallationNote, InstallationNote) " _
& "SELECT '" & frm.Type.Value & "', false, true, [Options] "
_
& "from qryInstallationNotes " _
& "WHERE [Manufacturer] = '" & frm.Manufacturer.Value & "'" _
& " and [CatalogNumber] = '" & frm.CatalogNo.Value & "';"

DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True
End Sub

Please post the SQL view of qryInstallationNotes. IS this in fact a table?
or
is it (as the name implies) a query? If its a query might it be causing
the
truncation?
 
J

John W. Vinson

you are correct, it is indeed a query [qryInstallationNotes ]

the code behind it is:

SELECT FixtureCatalogsInstallationNotes.Manufacturer,
FixtureCatalogsInstallationNotes.CatalogNumber, OptInstallationNotes.Options
FROM FixtureCatalogsInstallationNotes INNER JOIN OptInstallationNotes ON
FixtureCatalogsInstallationNotes.OptionNumber =
OptInstallationNotes.optionNumber;

Hrm. Nothing obvious about this that would truncate... if you open this query
as a datasheet do you see the full Options text? Are you perchance displaying
the Options on a form? If so, be sure there is no Format property on the
textbox displaying the field - ANY format will cause it to truncate (as will a
Sorting and Grouping by Options).
 
M

Mark Kubicki

got it...
thanks


John W. Vinson said:
you are correct, it is indeed a query [qryInstallationNotes ]

the code behind it is:

SELECT FixtureCatalogsInstallationNotes.Manufacturer,
FixtureCatalogsInstallationNotes.CatalogNumber,
OptInstallationNotes.Options
FROM FixtureCatalogsInstallationNotes INNER JOIN OptInstallationNotes ON
FixtureCatalogsInstallationNotes.OptionNumber =
OptInstallationNotes.optionNumber;

Hrm. Nothing obvious about this that would truncate... if you open this
query
as a datasheet do you see the full Options text? Are you perchance
displaying
the Options on a form? If so, be sure there is no Format property on the
textbox displaying the field - ANY format will cause it to truncate (as
will a
Sorting and Grouping by Options).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top