Please excuse a VFP developer trying to work in MS Access.
I have a database which I created in Access 2007 and then retro'd to Access 2003.
In this database is a table called Ajh82Work which has a one character text field called CR.
I am trying to Update this field by inserting a carriage return into it. This is needed so a Unix server will translate the file from a flat ASCII file properly.
I tried the Update queries listed in the snippet below. I do not get an error, but the field doesn't update either.
I then opened the table, and used <CTRL>+<Enter> to try to input the carriage return manually. All I got was beeped at.
I then opened the table in design view and set the default value for that field first to chr(13) and then to chr$(13).
This doesn't affect the data records I am importing, but the last record, for adding an additional record, has #Error in the CR field, not a carriage return.
This field will not accept a text char either, while the other text fields in the table will.
I can <CTRL>+<;> to enter today's date in a date field, but this darn CR field just won't take a chr() value.
All the other fields I update work fine.
Anyone have any suggestions?
Thanks in advance for any help offered.
Pat
Dim strSQL As String
strSQL = "Update [ajh82Work] Set [Ajh82Work].[CR] = Chr(13)"
'strSQL = "Update ajh82Work Set [Ajh82Work].[CR] = Chr$(13)"
'strSQL = "Update ajh82Work Set [Ajh82Work].[CR] = vbCR"
CurrentDb.Execute strSQL
DoEvents
I have a database which I created in Access 2007 and then retro'd to Access 2003.
In this database is a table called Ajh82Work which has a one character text field called CR.
I am trying to Update this field by inserting a carriage return into it. This is needed so a Unix server will translate the file from a flat ASCII file properly.
I tried the Update queries listed in the snippet below. I do not get an error, but the field doesn't update either.
I then opened the table, and used <CTRL>+<Enter> to try to input the carriage return manually. All I got was beeped at.
I then opened the table in design view and set the default value for that field first to chr(13) and then to chr$(13).
This doesn't affect the data records I am importing, but the last record, for adding an additional record, has #Error in the CR field, not a carriage return.
This field will not accept a text char either, while the other text fields in the table will.
I can <CTRL>+<;> to enter today's date in a date field, but this darn CR field just won't take a chr() value.
All the other fields I update work fine.
Anyone have any suggestions?
Thanks in advance for any help offered.
Pat
Dim strSQL As String
strSQL = "Update [ajh82Work] Set [Ajh82Work].[CR] = Chr(13)"
'strSQL = "Update ajh82Work Set [Ajh82Work].[CR] = Chr$(13)"
'strSQL = "Update ajh82Work Set [Ajh82Work].[CR] = vbCR"
CurrentDb.Execute strSQL
DoEvents