#Type! Error

lannoe

New member
Local time
Today, 12:28
Joined
Jun 22, 2015
Messages
5
This is my expression, very basic: =[Muni Master]![Address 1] & " " & [Muni Master]![Address 2]. Why do I get a #type! error. Both fields are short text.
 
Is it possible one of the value's is Null? Try wrapping both with nz() function.
Code:
=nz([Muni Master]![Address 1], vbNullString) & " " & nz([Muni Master]![Address 2], vbNullString)

Edit: Never mind, I tested this with null and it does not cause that particular error. There must be something else going on.
 
Last edited:
1. Is your report's data source actually Muni Master? Or is Muni Master part of a query and the query is the data source?

2. Did you mistype the table name?

3. Did you mistype the field name(s)?

4. Does Muni Master actually contain those fields?
 
lannoe,

When posting please provide as many details as possible or relevant so readers can see your issue in context.
Can you show us code, table design, error number.... what you have tried and results.
And welcome to the forum!
 
hi @lannoe,

where is this expression used? If in a ControlSource for the same object, then don't use form/source reference.
If that is the case, then

=[Address 1] & " " & [Address 2]

if a query or SQL to supply the source, then skip the form refeence.

If on another form:
[Muni Master] -->
forms![Muni Master]

... assuming form is a mainform-- if a subform, then ask for more info​

 
1. Is your report's data source actually Muni Master? Or is Muni Master part of a query and the query is the data source?

2. Did you mistype the table name?

3. Did you mistype the field name(s)?

4. Does Muni Master actually contain those fields?
The report is sorted on Muni Master - to list the organization name in alpha order with the contact information. Then it is sorted by Last name to list the names of employees of the organization in alpha order. The only two places that I get an error is the Muni Master Address line and Muni Master city and state line. The Muni Master Email works fine.

Here is a screen shot of the report.

1655995670815.png


This is the results:

1655996076599.png
 
So, using Table.Field works, but Table!Field does not?
 
Do you even need the table name?
 
In your example in post #6, can you show us the values for [address 1] and [address 2] in your table for that record,
And also the values for [city] and [State Province]?
 
suggest Use a dot (.) rather than a bang(!) as suggested by plog. Using a bang late binds
the field

Also advisable not to have spaces in field names - the square brackets resolve it in theory but in practice and when you have a standalone number as you have, can cause an error with a misleading description
 
This is my expression, very basic: =[Muni Master]![Address 1] & " " & [Muni Master]![Address 2]. Why do I get a #type! error. Both fields are short text.
Most important question, what's on the left side of the = sign?

That error indicates you're trying to assign an invalid type to "something", but we don't know what that something is..
 
I get (but don't approve of) not reading all the posts, but is skipping the immediate last two too much?
 
I fixed the error by recreating my query. It had something to do with my query - the way I pulled the information. Plog's post urged me to check out the query.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom