insert into

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I run the following query within query tab of access it works just fine
but when I try to run it in a vb module it tells me "number of query values
and destination fields are not the same". I have a primary key on the table
with autonumber. I have taken the primary key off the first field and it
still does not work from the vb module. The query has data in two fields
which should populate Consumer, and Appointment in tblSameday.

insert into tblSameday (Consumer, Appointment) select * from
qryTwoServiceSameDayAlert where begin_datetime = #" & newdate & "#"
 
Try specifying the fields in the select statement to ensure that you have the
proper number of fields.
 
You are writing into two fields. Consumer and Appointment.

Does qryTwoServiceSameDayAlert contain excatly 2 fields ?

Try changing "select * from " to "select fieldtogointoconsumer,
fieldtogointoappointment "

Mike Schlosser
 
Back
Top