Append Query

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

Guest

I have two tables. I am trying to isolate the lastname from a field in table
1 and append that data to a field in Table 2. I get zero records appended.
I am calling a function and know I am looking at each record. What am I
doing wrong?
 
herb said:
I have two tables. I am trying to isolate the lastname from a field in table
1 and append that data to a field in Table 2. I get zero records appended.
I am calling a function and know I am looking at each record. What am I
doing wrong?

Well, I don't know exactly what your Query looks like, but maybe you
could do this in separate steps:

- Append records containing the desired field (in toto) to [Table 2].
You might even do this without using a Query, by copying [Table 1],
calling the copy [Table 2], and deleting the fields you don't want to keep.

- Create a blank field, [lastname], in [Table 2] and run an Update
Query to extract the last name from the other field and stuff it into
[lastname].

- Delete the field in [Table 2] from which you got the [lastname] values.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
I have two tables. I am trying to isolate the lastname from a field in table
1 and append that data to a field in Table 2. I get zero records appended.
I am calling a function and know I am looking at each record. What am I
doing wrong?

I don't know. What are you doing?

Care to give us a hand and post the code?

Do note that an Append query does not append data to a field in an
existing record - it appends new records to a table. I think you may
need an Update query.

John W. Vinson[MVP]
 
Thanks for all the replies to this question, however I got it to work by
creating an alias field set to the function. See this query code:
INSERT INTO Foxboro ( HOMEOWNER, STREETNUM, BUILD_OWN )
SELECT getlastname([foxboroexcel]![Customer]) AS Lastname,
getstreetnum([foxboroexcel]![Customer]) AS Streetnum,
getbuildown([foxboroexcel]![Ship to]) AS BuildOwn
FROM FoxboroExcel;

Thanks again for your responses. I havn't worked with Access in over a year
so am very rusty.
 
Back
Top