Sorting & Grouping

G

Guest

I have designed a data Base report which includes sorting and grouping with
the following Field/Expression:

=InStr("g1g3g4g6g7g9g10g11g13g14g15g17g18g20",Left([AccountNameBas],2))

The problem is that the report, based on the above, lists for example G1 and
G4 but does not list for example G14. If I change the ,2 to say ,3 it lists
g4 and g14, but eliminates g1

Can some one please advise where I have gone wrong?
Many thanks
 
J

John W. Vinson

I have designed a data Base report which includes sorting and grouping with
the following Field/Expression:

=InStr("g1g3g4g6g7g9g10g11g13g14g15g17g18g20",Left([AccountNameBas],2))

The problem is that the report, based on the above, lists for example G1 and
G4 but does not list for example G14. If I change the ,2 to say ,3 it lists
g4 and g14, but eliminates g1

Can some one please advise where I have gone wrong?
Many thanks

What are the left two bytes of the text string "G14"? or "G1025" for that
matter? G1.

If you search that string for the left two bytes of AccountNameBas, you will
find G1 if AccountNameBas starts with G1 - and G14 or G18 do indeed start with
G1.

What are you trying to accomplish here!? What are the values of
AccountNameBas? What do you intend to do with this InStr position?

John W. Vinson [MVP]
 

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