Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically Delete prices from reprot field??

Status
Not open for further replies.

bluedollar

Programmer
Jul 24, 2003
174
GB
I have a field on my report called 'details' which is taken from a table called 'quote'.

The details field contains details about the quote, however within the details are prices.

We want all the data from the details field, without the prices. The prices always start with a £ symbol.

Is there a way of automatically omitting these prices from the report?

For example:

To supply 9 no. padlocks & straps @ £ 8.50 each:- £ 76.50

Carriage:- £ 2.00

Please state the length required for the strap and padlock size.

Would show as:

To supply 9 no. padlocks & straps @ each:-

Carriage:-

Please state the length required for the strap and padlock size.

Any help would be greatly appreciated.

Thanks

Dan
 
Depends on how standardized the structure is of the details field, which I'm assuming is just a text field.

You could look for the £ symbol using an instring function and delete from that point to wherever the second space occurs by using the midstring function to select a section of the text, but that assumes that all entries with the price start with the £ symbol and that is immediately followed by a single space, the price, and then another space. It can be done, but involves a series of VBA statements to find each symbol, then locate the second space, and then building a new text string that doesn't include any of the prices. Hopefully, this will help, but you'll have to place around with it a while to get it to work. And remember that if the quotes don't follow the correct format, your code won't work. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top