Access 2003 - Joining number and text data


A

Abay

Hello,

I have a numeric counter field, defined as "decimal, precision 3" as I want
to display only 3 digits on a form.

This field needs to be added to text to create a text field called Item.
The Item field should look like "V-" followed by the counter, showing
leading zeros .. e.g. like "V-001" and so on.

I can display the leading zeros in the numeric counter field using a format
of "000" but don't know how to show the zeros when it is added to the Item
field, as the result looks like "V-1"

Any help would be most appreciated.

Abay
 
Ad

Advertisements

A

Abay

Many thanks for your response Karl ... I tried the following:

Item = "V-" & Format([Forms]![Valve_master]![Valve_counter], "000")

and got an error message "Compile error, can't find project or library" ..
"Format" is high lighted

I re-installed Access and still get the same message ...

Again any help would be most appreciated.

Abay




KARL DEWEY said:
[Item] & "-" & Format([CounterField], "000")

--
Build a little, test a little.


Abay said:
Hello,

I have a numeric counter field, defined as "decimal, precision 3" as I
want
to display only 3 digits on a form.

This field needs to be added to text to create a text field called Item.
The Item field should look like "V-" followed by the counter, showing
leading zeros .. e.g. like "V-001" and so on.

I can display the leading zeros in the numeric counter field using a
format
of "000" but don't know how to show the zeros when it is added to the
Item
field, as the result looks like "V-1"

Any help would be most appreciated.

Abay


.
 
Ad

Advertisements

A

Abay

I just want to say many thanks again for your help. I am having a little
trouble at home between dbs for 2003 & 2007. The problem is for a 2007 db
at work, which I had saved as an earlier version and taken home .. this
does not seem to work correctly when opened in my 2003 van

So, I tested the code in a valid 2003 dbase that I have at home and of
course it worked, yeah ... the good news for me is that I will be getting a
2007 update at home next week.

So grateful for your help and all the help I get from this terrific
newsgroup.

Abay

KARL DEWEY said:
[Item] & "-" & Format([CounterField], "000")

--
Build a little, test a little.


Abay said:
Hello,

I have a numeric counter field, defined as "decimal, precision 3" as I
want
to display only 3 digits on a form.

This field needs to be added to text to create a text field called Item.
The Item field should look like "V-" followed by the counter, showing
leading zeros .. e.g. like "V-001" and so on.

I can display the leading zeros in the numeric counter field using a
format
of "000" but don't know how to show the zeros when it is added to the
Item
field, as the result looks like "V-1"

Any help would be most appreciated.

Abay


.
 

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