Topics Search

Add New Record - Update Query

Add New Record - Update Query
Views: 1
I've made an update query that updated the stock in the stock table when I order something. Now I have to have the serial number of the product already stored in the stock table to run the update query else it won't work .

Is there any way I can add a new record with an update query and store the quantity available in the stock table to be equal to the qty I have ordered viathe order form.
Sponsored Links:

More topics


An update query on current recordset

I need to enter a record into the table, check for a duplicate record before update and if one is located; I need an update query to run on the new record I am entering via the form.

The code checks for the duplicate and displays the warning message fine, my disconnect is with the update query. I can't seem to get it to select the current record set.

Different actions for Insert and Update

I'm probably having a really blonde day, but I'm trying to get set a form to run one bit of code if I update a record in a table & a slightly different bit if I add a new record.

I've added msgbox's to test the code & if I update a record, only the 'After Update' code runs but if I add a new record, the 'After Update' code runs & then the 'After Insert'. I'm trying to think of a way to make it distinguish between an update & a new record so I can stop the 'After Update' event happening for new records. Coming up blank at the moment.

Is there a trigger? -am I just being really blonde & missing it

Update query, adding to existing records

I'm trying to create a query in which depending on which record is selected in Frm_News it will add that record to an existing record in Tbl_Temporary details.

Update Field list in Table with Query

Is it possible to update the field listing of a table based on the data stored in another table.

I am building something that involves shares and stocks. When I purchase another stock - I would record the details of the stock in Table 1 then I would like it to be able to add a new field in Table 2 where I can record the daily closing price.

The closest I can find is an update query, but that only updates values in a table, not the actual table itself

passing an input from one query to a subsequent docmd.OpenForm

I have an update query which takes information from a record in one table and creates a record in another table, updating this new record with data from the first record. Having created this new record, I want to show it to the user. I have a form that prompts for the user's name and displays that record.

Now, the update query already prompts for the name field and so I would like to avoid having to force the user to enter that name again when, after having created the new record, I want toshow them the recreated record for their review.

Adding a single new record using multiple forms

I want to create a database that will add new records individually but there are so many attributes that I needed to use 5 different forms rather than one very large form. I am having trouble having the 2nd, 3rd, 4th and 5th forms add the new values to the existing row.

Right now I have an EMPLOYEE table where a new employee is added. The next forms add information but I need them to update the existing row using the unique ID number that an AutoNumber.

I want the second form to access the record that was created with my first form. Can I have an Update Query that automatically edits the most recent record added?

Macro to add record and run query

hopefully this'll be a really easy thing that will be a bit embarrassing, bit quick

anyway I have a button (on a form) and using the wizard have got it to add a new record
and have a seperate update query for something and thought itd be handy if the button could run that query as well, so immediately thought of macros and just to have the button run the macro
so gone to make a macro and got it to run the query easy, only thing I havent seen in the things that the macro will do is add a new record
does anyone know how to make the macro add a new record?
not too experienced with macros as im sure you can tell

VB Help update is supposed to be null.

I currently have the following vb code, which works if you are trying to update a record, but it still gives the message prompt when I am trying to add a new record and the field that it is trying to update is supposed to be null.

How can I have this code function when trying to update a record already filled out and not pop up when adding a new record?

last update in field deffualt value

See that attched simple database file I want in field distention last update value autocratically default at value for add new record.

I mean when I add st1 in filed distention when I add new record st1 appear
when I change st1 into F1 manual when I add new record last value was
distention that appear

update query from a query ?

I am rubbish at access but seem to be pushed into it on many occassions as I am able to turn a computer on.

How would I update the contents of one record in a table to another record in the same table. Before you rush a reply and say an update query ( if thats what you were going to say ), please read on

I have a table that has 2 pieces of information that I need to merge. The problem is eg (client id number 1, report number 1) has information in it and (client id number one report number 2) would like to have that informatiion. I have set up querys for [Master report] which filters report 1 and another [master update] which filters report 2. I have tried to run an update query on [master report] to influence [master update] but it does not seem to work, at best it warns me its going to update but does nothing. Im now guessing that I cannot update 1 query from another. disregarding queries as Im not sure im on the right track anyway, how would you guys do this ?. Im running access 2010 office