Add records of one table to another table

R

randy bedore

We are transitioning from Paradox to Access. In paradox, when I wish to add a
lot of new records to my main table, I build a table containing the new
records, strutured the same as the main table, except that the new record
table is not keyed. After entering data into the unkeyed new record table I
then add the records in this new record table to my main table. I would like
to do something similar in Access. I do have a copy of Prague/Irwin/Reardon
Access bible. What is this procedure called, in Access, and where might I
read up on this?
 
K

Klatuu

All you need is an append query that will copy the records to the main table
if your key field is an auto number; however, in Access this is not necessary.
 
C

Chad

I got everything working but I have a question. If I check the checkbox for
an employee to be inactive then how would I remove his name from two combo
boxes im using on two different forms?
 
K

Klatuu

If the row source for the combos are queries, just add a Where condition to
the row source query to filter on only Active employees.
 
C

Chad

I used a query for the combo box and set the status criteria to false. and
that worked good. I didnt know what you ment by setting the Where condition
did you mean (Total: Where)? now im having a new problem. If I update an
employees status to inactive and close the form NOTE: im using
Forms![Switchboard].Visible = True to open back up. then go to select from
the combo box it still shows the inactive employee. I tried to use
Forms![Switchboard].Requery on the switchboard to get the list to refresh and
it doesnt. Any sugestions? It works but I cant get it to refresh the list
since the form was just visable=False then visable again instead of closing
and opening forms. Thanks!
 
K

Klatuu

You need to requery the combo box.

Forms![Switchboard]![ComboBox].Requery

If the code is in the form module, all you need is:

Me.ComboBox.Requery

--
Dave Hargis, Microsoft Access MVP


Chad said:
I used a query for the combo box and set the status criteria to false. and
that worked good. I didnt know what you ment by setting the Where condition
did you mean (Total: Where)? now im having a new problem. If I update an
employees status to inactive and close the form NOTE: im using
Forms![Switchboard].Visible = True to open back up. then go to select from
the combo box it still shows the inactive employee. I tried to use
Forms![Switchboard].Requery on the switchboard to get the list to refresh and
it doesnt. Any sugestions? It works but I cant get it to refresh the list
since the form was just visable=False then visable again instead of closing
and opening forms. Thanks!



Klatuu said:
If the row source for the combos are queries, just add a Where condition to
the row source query to filter on only Active employees.
 
C

Chad

Where would I put the code? In the foms on open or in the combo box? Thanks!
--
Newbies need extra loven.........


Klatuu said:
You need to requery the combo box.

Forms![Switchboard]![ComboBox].Requery

If the code is in the form module, all you need is:

Me.ComboBox.Requery

--
Dave Hargis, Microsoft Access MVP


Chad said:
I used a query for the combo box and set the status criteria to false. and
that worked good. I didnt know what you ment by setting the Where condition
did you mean (Total: Where)? now im having a new problem. If I update an
employees status to inactive and close the form NOTE: im using
Forms![Switchboard].Visible = True to open back up. then go to select from
the combo box it still shows the inactive employee. I tried to use
Forms![Switchboard].Requery on the switchboard to get the list to refresh and
it doesnt. Any sugestions? It works but I cant get it to refresh the list
since the form was just visable=False then visable again instead of closing
and opening forms. Thanks!



Klatuu said:
If the row source for the combos are queries, just add a Where condition to
the row source query to filter on only Active employees.
--
Dave Hargis, Microsoft Access MVP


:

I got everything working but I have a question. If I check the checkbox for
an employee to be inactive then how would I remove his name from two combo
boxes im using on two different forms?
--
Newbies need extra loven.........


:

All you need is an append query that will copy the records to the main table
if your key field is an auto number; however, in Access this is not necessary.
--
Dave Hargis, Microsoft Access MVP


:

We are transitioning from Paradox to Access. In paradox, when I wish to add a
lot of new records to my main table, I build a table containing the new
records, strutured the same as the main table, except that the new record
table is not keyed. After entering data into the unkeyed new record table I
then add the records in this new record table to my main table. I would like
to do something similar in Access. I do have a copy of Prague/Irwin/Reardon
Access bible. What is this procedure called, in Access, and where might I
read up on this?
 
K

Klatuu

In the After Update event of the check box.
--
Dave Hargis, Microsoft Access MVP


Chad said:
Where would I put the code? In the foms on open or in the combo box? Thanks!
--
Newbies need extra loven.........


Klatuu said:
You need to requery the combo box.

Forms![Switchboard]![ComboBox].Requery

If the code is in the form module, all you need is:

Me.ComboBox.Requery

--
Dave Hargis, Microsoft Access MVP


Chad said:
I used a query for the combo box and set the status criteria to false. and
that worked good. I didnt know what you ment by setting the Where condition
did you mean (Total: Where)? now im having a new problem. If I update an
employees status to inactive and close the form NOTE: im using
Forms![Switchboard].Visible = True to open back up. then go to select from
the combo box it still shows the inactive employee. I tried to use
Forms![Switchboard].Requery on the switchboard to get the list to refresh and
it doesnt. Any sugestions? It works but I cant get it to refresh the list
since the form was just visable=False then visable again instead of closing
and opening forms. Thanks!



:

If the row source for the combos are queries, just add a Where condition to
the row source query to filter on only Active employees.
--
Dave Hargis, Microsoft Access MVP


:

I got everything working but I have a question. If I check the checkbox for
an employee to be inactive then how would I remove his name from two combo
boxes im using on two different forms?
--
Newbies need extra loven.........


:

All you need is an append query that will copy the records to the main table
if your key field is an auto number; however, in Access this is not necessary.
--
Dave Hargis, Microsoft Access MVP


:

We are transitioning from Paradox to Access. In paradox, when I wish to add a
lot of new records to my main table, I build a table containing the new
records, strutured the same as the main table, except that the new record
table is not keyed. After entering data into the unkeyed new record table I
then add the records in this new record table to my main table. I would like
to do something similar in Access. I do have a copy of Prague/Irwin/Reardon
Access bible. What is this procedure called, in Access, and where might I
read up on this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top