View Full Version : Updating Data


mdetora
08-05-2004, 08:28 AM
I have a database where I would like to do the following:

-Prompt the user for the following parameters for a price change:
[Program Name]
[Begining Date]
[End Date]
[New Price]

-Display the following data to the user:
[Program Name], [Begining Date], [End Date], [Current Price], [New Price]

-Prompt for confirmation of update (ie: You are about to change the following data.)

-Update the data based on the parameters entered by the user.

I've tried using forms and update queries but have not had any luck. Please Help! Thanks!

Jon K
08-07-2004, 10:06 PM
I've tried using forms and update queries but have not had any luck.

I have attached a sample database to show you how to update a record with an Unbound Form and an update query.

You can open the form, select a program name, change the beginning and end dates and/or the price, and click on the command button to update the record in the table.

The code used is in the On Change event of the combo box and the On Click event of the command button.


I have also included a Bound Form created using the form wizard. On the form, you can update as well as add new records to the table without adding any code (though, if you want to, you can add your own code, too.)


Unless you have a reason for using an Unbound Form, the Bound Form is usually the preferred choice.