Wrong Answer concatenating fields

L

L R Fizia

Firstly I'm not good enough in VBA etc so I am just using Access's own
facilities
It's an inherited database that follows the rule of - "It would probably be
easier to start again", but too much uses it so I can't change it too much!

I have 5 fields in a table that are shown individually in a form

µ, Width, colour, Matl & MatlComment

when I use the following to string them together

=[µ] & " x " & [Width] & " " & [Colour] & " " & [matl] & " " & [MatlComment]

to tidy up the display, and give

300 x 500 Clear APET/PE Peelable

Instead of

300 500 Clear APET/PE Peelable

one field 'Width' always shows a fixed answer - today it is 8519 - the 1500
records vary in value fronm 250 to 800!!

If I add a [Width] field above it in the form as a check, it shows the
correct value!!

Yesterday it was 36882 as a fixed value!

I have checked and Width is not a reserved name or anything.

At head banging stage since it must be simple, but can't see my problem
 
S

Stefan Hoffmann

hi,
when I use the following to string them together

=[µ] & " x " & [Width] & " " & [Colour] & " " & [matl] & " " & [MatlComment]

one field 'Width' always shows a fixed answer - today it is 8519 - the 1500
records vary in value fronm 250 to 800!!
Yesterday it was 36882 as a fixed value!
Width is seems to be the width of the form in this case, so I would
assign a field name alias in your query.


mfG
--> stefan <--
 
L

L R Fizia

Thanks

Thought that might be the reply!
It's just the hassle of changing all the original database - Mine just links
to the tables in it - they have field names like [KG PER 1000] and [CAVITY
DIA (MM)]!!!!

Everything is in CAPS LOCK!!

Aaaaaggggggghhhhhhhhhhhhh................


Lorence


Stefan Hoffmann said:
hi,
when I use the following to string them together

=[µ] & " x " & [Width] & " " & [Colour] & " " & [matl] & " " & [MatlComment]

one field 'Width' always shows a fixed answer - today it is 8519 - the 1500
records vary in value fronm 250 to 800!!
Yesterday it was 36882 as a fixed value!
Width is seems to be the width of the form in this case, so I would
assign a field name alias in your query.


mfG
--> stefan <--
 
L

L R Fizia

Sorry - forgot to say - Not using a query - direct link to table data else I
would have created the alias

Lorence

Stefan Hoffmann said:
hi,
when I use the following to string them together

=[µ] & " x " & [Width] & " " & [Colour] & " " & [matl] & " " & [MatlComment]

one field 'Width' always shows a fixed answer - today it is 8519 - the 1500
records vary in value fronm 250 to 800!!
Yesterday it was 36882 as a fixed value!
Width is seems to be the width of the form in this case, so I would
assign a field name alias in your query.


mfG
--> stefan <--
 
D

Dirk Goldgar

L R Fizia said:
Sorry - forgot to say - Not using a query - direct link to table data else
I
would have created the alias


You might try using

[Form]![Width]

instead of just

[Width]

to see if it makes a difference. Or rename the control bound to that field
to "txtWidth", and use

[txtWidth]

in your calculated control's controlsource.
 
R

Roger Carlson

Then why not create a query to base the form on? Something like:

SELECT *, [Width] AS MWidth FROM yourtablename

That would be easier than changing the field name. However, if you do
decide to change the fieldname, there is a shareware utility called Find And
Replace by Rick Fisher (http://www.rickworld.com/download.html), that will
take a lot of the sting out of the task. (Registering it gives you more
functions and is well worth it.)

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



L R Fizia said:
Sorry - forgot to say - Not using a query - direct link to table data else
I
would have created the alias

Lorence

Stefan Hoffmann said:
hi,
when I use the following to string them together

=[µ] & " x " & [Width] & " " & [Colour] & " " & [matl] & " " &
[MatlComment]

one field 'Width' always shows a fixed answer - today it is 8519 - the
1500
records vary in value fronm 250 to 800!!
Yesterday it was 36882 as a fixed value!
Width is seems to be the width of the form in this case, so I would
assign a field name alias in your query.


mfG
--> stefan <--
 
J

Joshua

Maybe:

Me.Yourfield.Value = Me.µ & " " & " x " & Me.Width & " " & Me.Colour & " " &
Me.matl & " " & Me.MatlComment

Maybe not?
 

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