[AccessD] Update query

Darryl Collins Darryl.Collins at iag.com.au
Sun Jun 5 22:50:59 CDT 2011


_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________



Check that all the field data types are the same in the source and target.  "Type mismatch in expression" usually means you are trying to write a string value in to number field (or some other data mismatch of that nature).  Could be as simple as trying to move a number that is dimmed as double in one table and an integer in the other.
That is where I would look first.

cheers
Darryl. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski
Sent: Monday, 6 June 2011 1:41 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Update query

Hi Folks

I am having trouble getting an update query to work.

Table1
	Field1HouseNumber (Number, Long Integer)
	Field2StreetID (Number, Long Integer)
	Field3ParcelID (Text) ..................... Currently all empty

Table2
	Field1_loc_st_nbr (Number, Long Integer)
	Field2_loc_st_name_id (Number, Long Integer)
	Field3_parcel_id (Text)

I need to populate Table1, Field3 with the contents of Table2, Field3 *if*
Table1/Field1 = Table2/Field1 <and> Table1/Field2 = Table2/Field2.

My update query has three columns:

Column1
	Field: Field1HouseNumber
	Table: Locations
	Criteria: =[Table2].[Field1]

Column2
	Field: Field1StreetID
	Table: Locations
	Criteria: =[Table2].[Field2]

Column3
	Field: Field3ParcelID
	Table: Locations
	Update To: [Table2].[Field3]

Whe I click on "Run", I received the following error:
	"Type mismatch in expression"

I would *really* appreciate and hekp, suggestions or direction here ... I've
never done an update query that matches on more than one criteria before ...

Thanks
Bob Gajewski

PS - I know how to write the entire update procedure in a VBA module ... But
where would I execute it?


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended 
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon this information, by persons or entities other than the intended recipient is 
prohibited.

If you have received this in error, please contact the sender and delete this e-mail 
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute 
the information contained in this e-mail and any attached files, with the permission 
of the sender.

This message has been scanned for viruses.
_______________________________________________________________________________________




More information about the AccessD mailing list