View Single Post
  #3  
Old February 10th, 2010, 01:20 AM posted to microsoft.public.access.forms
Frank[_26_]
external usenet poster
 
Posts: 13
Default Add new records into source table on Form

On Feb 9, 11:26*am, Daryl S wrote:
Frank -

You probably need some criteria in your append query to only append the
'current' record on the form. * You can do this in query design by using the
build button when you are in the criteria row for the training course field. *
You can test it if the form is open by switching to datasheet mode in the
query to see what would be added.
--
Daryl S



"Frank" wrote:
I created a form for training records. The data source is table
TRAINING. The form has Combo box that is
used to select employee. When the employee is selected, the employee's
data, such as employee_id,
manager, phone, training_course display in the form. *This part of the
form works well.


There was new request from my client. It's requsted that when the
training_course displayed on the form is changed, *the record with new
training_course can be added into source table TRAINING. So, I created
"Add" buttorn on the form and used append query method to add the
records into the TRAINING table. However, it did
not work as I expected. Using append query method, all records of the
emplyee in the source table were added into the same (the table has
dupcate records), which is not I wanted. I just want to add the new
record of the employee (the record shown on the form) to be added into
the table. I am not expert on Access. I appreciate any of the help on
the issue.


Thanks


Frank
.- Hide quoted text -


- Show quoted text -


Daryl,

I added criteria in my append query. I built 2 criteria: 1 [Forms]!
trainingForm]!employee_id] = training.employee_id. 2. Forms]!
trainingForm]!course_name] training.course_name.
After I applied these criteria in the query, no row was appended into
the table. However, If I took out criteria 2. all records with the
employee_id were append into the table.

Any idea?

Thanks

Frank