Access 2003 / Update fileds

  • Thread starter Thread starter Abay
  • Start date Start date
A

Abay

Hello,

I have a text field to which I would like to add the contents of another
field plus some more text. My update query is as follows:

Left([Desc],28) & [Pubdate] & "*BOOK" (Desc contains a book title)

I wish to add the contents of the field Pubdate starting at position 29 of
the Desc field, and append the *BOOK text after that.

The update works, however the Pubdate, and it's following text are added at
the end of the book title wherever that occurs, i.e. not at position 29,
unless the Title had 28 characters or more.

Any help with this would be most appreciated.

Abay
 
Hello,

I have a text field to which I would like to add the contents of another
field plus some more text. My update query is as follows:

Left([Desc],28) & [Pubdate] & "*BOOK" (Desc contains a book title)

I wish to add the contents of the field Pubdate starting at position 29 of
the Desc field, and append the *BOOK text after that.

The update works, however the Pubdate, and it's following text are added at
the end of the book title wherever that occurs, i.e. not at position 29,
unless the Title had 28 characters or more.

Any help with this would be most appreciated.

Abay

Pad the Desc:

Left([Desc] & String(28, " "), 28) & [Pubdate] & "*BOOK"

You might want to use the Format() function to cast Pubdate into a consistant
format.

Do note that this value should almost certainly NOT be stored in any table
field, as it can and should be calculated on the fly as needed!
 
Hello again John,

Many thanks for your reply, and of course it worked & it will not ever be
used as a table field, always calculated on the fly, as you say, as needed.

Your help is much appreciated.

Abay

John W. Vinson said:
Hello,

I have a text field to which I would like to add the contents of another
field plus some more text. My update query is as follows:

Left([Desc],28) & [Pubdate] & "*BOOK" (Desc contains a book title)

I wish to add the contents of the field Pubdate starting at position 29 of
the Desc field, and append the *BOOK text after that.

The update works, however the Pubdate, and it's following text are added
at
the end of the book title wherever that occurs, i.e. not at position 29,
unless the Title had 28 characters or more.

Any help with this would be most appreciated.

Abay

Pad the Desc:

Left([Desc] & String(28, " "), 28) & [Pubdate] & "*BOOK"

You might want to use the Format() function to cast Pubdate into a
consistant
format.

Do note that this value should almost certainly NOT be stored in any table
field, as it can and should be calculated on the fly as needed!
 
Abay said:
Hello,

I have a text field to which I would like to add the contents of another
field plus some more text. My update query is as follows:

Left([Desc],28) & [Pubdate] & "*BOOK" (Desc contains a book title)

I wish to add the contents of the field Pubdate starting at position 29 of
the Desc field, and append the *BOOK text after that.

The update works, however the Pubdate, and it's following text are added
at the end of the book title wherever that occurs, i.e. not at position
29, unless the Title had 28 characters or more.

Any help with this would be most appreciated.

Abay
 
Back
Top