Bob Gajewski
rbgajewski at roadrunner.com
Mon Jun 6 19:59:10 CDT 2011
Sure William This is a one-time data merge, so calling it from a macro would be fine .... TIA Bob -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Monday, June 06, 2011 00:46 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Update query >> PS - I know how to write the entire update procedure in a VBA module ... But where would I execute it? How you execute it depends on what is going on at the time you want it to be executed. Could you be clearer about whether 1) This is in response to some button the user is clicking 2) You'd like it to run from a macro 3) You'd like it to happen on database startup 4) Something else -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Sunday, June 05, 2011 11: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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com