Updating records in access Skype hot chat


19-Feb-2015 17:53

Changing records manually is not only time consuming, it is also inefficient, and lends itself to errors as you update the records.

The best way to handle this type of event, the updating of many records in a database table, is to use an Update Query to make the changes to data in one operation.

A Microsoft Access Update Query updates specified values in a table for all records or for those records that match a specified criteria.

It is possible to update records manually in a database table, either via a form or through the tables datasheet, however this may take a very long time.

This is my first shot at VBA, and after an hour of searching I cannot find anything to solve my problem. Working in Microsoft Access 2007 Further Info All tables are normalized Vehicle Table: Contains vehicle_id(pk), as well as rego and model etc Job Table: Contains job_id(pk), vehicle_id(fk) and other info about what needs to happen, as well as the next occurance date, days between each occurance of the job (all jobs repeat) and other info Job History Table: Contains job_history_id(pk), job_id(fk), date completed and comments When the job completed button is pressed, it should create a new entry in the job history table with the current date, any comments and the job id This is the script I am trying to get working Private Sub Command29_Click() Dim str SQL1 As String Dim str SQL2 As String Set Rs = Current Rs Set db = Current Db str SQL1 = "INSERT INTO completed_jobs(JOB_ID, DATE_COMPLETED, COMMENTS) VALUES " & Rs! @Matt I am 90% sure I am using a bound form (Like I said, new to Access, been looking at everything people have suggested and learning as I go).

Once you have ran the update query, you can check the results by once again changing the update query back to a select query.

I have a job-tracking system, and there is a query that returns results of all jobs that are overdue. Execute str SQL2, db Fail On Error End Sub is completely incorrect, I believe this is what I need to figure out?

updating records in access-2

the bible on dating

Now consider the following scenario example, that will illustrate the use of a Microsoft Access Update query: One of your product suppliers has decided to increase the price of their products by 3 percent (%) across the board.

You have decided that you will use an Update Query to change all of the relevant records in your Products table.

Our original table appears like the following example: The original Products table before we run the Update Query We need to update the Unit Price field, to update all records from our supplier (Exotic Liquids) as they have informed us of a 3% price increase.

Here are the steps that we follow to produce the required outcome: Remember that the update query will permanently update records from the specified table(s), therefore it is very important that you have backed up the table(s) or database before running this object.

I have a form that displays each of these jobs one-by-one, and has two buttons (Job has been completed, and Job not completed). I cannot find a way to get access to the current record to update it's contents if the "Has been Completed" button is pressed, the closest I can get is the long number which represents the records position in the form. This is called on button-press I am posting an image which shows the form (non-continuous).

The VBA to get the index of the record in the form is as follows. Execute str SQL1, db Fail On Error str SQL2 = "UPDATE job SET JOB_NEXT_OCCURANCE = JOB_NEXT_OCCURANCE+JOB_RECURRANCE_RATE WHERE job. @Hans Up, I get what you are saying, but I dont quite think it's applicable (I did not provide enough information first time around for you to understand I think) @sarh I believe this Recordset that you are talking about is what I need, however I cannot figure out how to use it, any hints?