Thank you for letting me in (1 Viewer)

srkjul

New member
Local time
Today, 07:38
Joined
Feb 1, 2024
Messages
1
I am new in VB and still learning, hope for your help when the goings get tough :)

I need help making a text string from text lines in Navision 2017, I am making a price list and need to put text lines after one another.

I figured something out like this but I cannot see how to stop the loop from copying itself, have a look at visual text which is shown twice.

What mistake did I make?
 

Attachments

  • Købsprisopdatering opdatering af tekst streng.jpg
    Købsprisopdatering opdatering af tekst streng.jpg
    129.2 KB · Views: 19
  • Text visual in Access.jpg
    Text visual in Access.jpg
    160.7 KB · Views: 21

Jon

Access World Site Owner
Staff member
Local time
Today, 06:38
Joined
Sep 28, 1999
Messages
7,396
Welcome to Access World! We're so happy to have you join us as a member of our community. As the most active Microsoft Access discussion forum on the internet, with posts dating back more than 20 years, we have a wealth of knowledge and experience to share with you.

We're a friendly and helpful community, so don't hesitate to ask any questions you have or share your own experiences with Access. We're here to support you and help you get the most out of this powerful database program.

To get started, we recommend reading the post linked below. It contains important information for all new users of the forum:

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We hope you have a great time participating in the discussion and learning from other Access enthusiasts. We look forward to having you around!
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:38
Joined
Feb 28, 2001
Messages
27,186
Since that was your first post, you are clearly new here. Just as a point of preference, we normally only post personal introductions here and choose another forum topic for problem posts. Don't worry about penalties or anything like that, though. This happens all the time.

So first... hello and welcome to the forums.

Second, I am going to move your post from the introduction title to what I believe will be a better technical choice ... Modules and VBA. Don't worry, folks will be able to find it there. After that, I'll look at your presentation images.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:38
Joined
Feb 28, 2001
Messages
27,186
Now that I have moved the entry, you have a sequence where you ask "If <two numbers match two global numbers>" ... then you check if your global Tekst is not blank ... and if it is not, append a v-bar {|}, probably as a separator, after which you concatenate strings.

A couple of questions apply here.

That query output in your 2nd exhibit doesn't appear to have any other fields and from what we CAN see, we can't tell if some records were skipped. Which means we can't tell if duplicate records were originally involved. As a result, we cannot tell how often you call that routine to do the concatenation.

For instance, do you call it once per record? If so, does the code that drives this use a SELECT DISTINCT to pick records? Because if not, I could easily see that if you had any duplicate records and didn't guard against that, you would easily get the kind of concatenation you showed in the second exhibit.
 

Users who are viewing this thread

Top Bottom