Share via

Label text problem access 2021

Anonymous
2022-12-04T20:41:58+00:00

I have recently updated my Office system to 2021 from 2010. Now all sorts of voodoo has appeared and really not appreciated. however, being that time of year I have to produce a list of labels to send the yuletide greetings and one of the only functions access has to perform every year, all other database functions are left to SQL.

The first problem encountered was this version of access does not support replicated databases, try using an older version. Haven't a clue to what that means, Hard earned Sheckles down the pan ?

having converted an older datafile to the requisite now acceptable format and saved it to the new file format, proceeded to use the label creation function.

process simple enough and end product displayed of screen seem to be fine. Press Print Preview and all the labels are as they should be except for the first line of each label which displays #Text! instead of the correct text and it also prints #Text! instead.

Anyone any ideas what is causing this to happen or better still how to prevent it

Microsoft 365 and Office | Access | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2022-12-05T16:38:20+00:00

So, so the Control Source fo the top control is:

=Trim([title] & " " & [Initial] & " " & Report![Name])

So I see two problems with that. What is probably throwing you off is the Report![Name]. If the Report isn[t open that would cause an error. I don't know how the Report got in there but it shouldn't be. It should be:

=Trim([title] & " " & [Initial] & " " & [Name])

However, Name is a reserved word in Access and shouldn't be used used as a Field name. So you should probably change the field name if removing Report doesn't work.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-12-05T16:05:46+00:00

    Don't know where to find that info so I have attached 3 images of what the wizard produced.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-12-05T15:57:56+00:00

    Rather than having a separate text box control for each line of the address, if you just have a single text box sized to the full height of the label, then you can concatenate the lines into a single string expression, with each line terminated by a carriage return/line feed, using the following function published by Microsoft some years ago:

    Public Function CanShrinkLines(ParamArray arrLines())

        ' Pass this function the lines to be combined

        ' For example: strAddress =

        ' CanShrinkLines(Name, Address1, Address2, City, State, Zip)

        Dim X As Integer, strLine As String

        For X = 0 To UBound(arrLines)

            If Not IsNull(arrLines(X)) And Trim(arrLines(X)) <> "" Then

              strLine = strLine & vbCrLf & arrLines(X)

            End If

        Next

        ' remove leading carriage return/line feed

        CanShrinkLines = Mid(strLine, 3)

    End Function

    Any Null lines in the address will be suppressed, avoiding unsightly gaps For an example take a look at Concat.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    If you have trouble downloading a specific file, clicking on the 'Download' button at the top of the page while no files are selected should download a zip file of all files in the folder, from which you should then be able to unpack the relevant file.

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2022-12-05T01:46:04+00:00

    What is the ControlSource of the first line of the label?

    Was this answer helpful?

    0 comments No comments
  4. George Hepworth 22,855 Reputation points Volunteer Moderator
    2022-12-04T20:50:43+00:00

    Replication was a feature in mdbs back in the Access 97 to 2003 range. It was dropped when accdbs replaced mdbs. If you upgraded the older mdb with replication, it will not be available, but that is no real loss, for the most part.

    Here's an interesting discussion from several years ago.Searching the internet will probably turn up more, if you are really interested.

    We'd have to see the SQL and any VBA in the report that you created to guess at what that problem might be.

    Was this answer helpful?

    0 comments No comments