By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

Simple code to delete all rcd in a table and import records to same table

P: n/a
Hi,
I am trying to create a form that would have only two buttons on it.
When the user clicks on one of the buttons it will issue a prompt such
as

Do you wish to delete all records from the Classes Table?
YES NO

Upon clicking on yes, then all the records in the classes table would
be deleted.
The second button when click would ask:

Do you wish to import records to the classes table. If the user
clicks the yes button then records are imported from a ascii(Text
file, with field delimiters) into the classes table.

Know this should be simple, but I seemed to be making it harder than
it should.
Any suggestion on logic to use?

Thanks,

Jeff
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Create yourself a delete query and an append query that does what you want.
When you have that working, call them using the command buttons. The syntax
to run them is

CurrentDb.Execute "QueryName", dbFailOnError

--
Wayne Morgan
Microsoft Access MVP
"Jeffro" <je**********@dhs.gov> wrote in message
news:c3**************************@posting.google.c om...
Hi,
I am trying to create a form that would have only two buttons on it.
When the user clicks on one of the buttons it will issue a prompt such
as

Do you wish to delete all records from the Classes Table?
YES NO

Upon clicking on yes, then all the records in the classes table would
be deleted.
The second button when click would ask:

Do you wish to import records to the classes table. If the user
clicks the yes button then records are imported from a ascii(Text
file, with field delimiters) into the classes table.

Know this should be simple, but I seemed to be making it harder than
it should.
Any suggestion on logic to use?

Thanks,

Jeff

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.