Updating A Field

Jan 22, 2008

Hi,

I wasn't quite sure what to call the topic as I am not really sure what it is I am looking for.

I have an Item table. This contains a field called ItemsRemaining.

I have a form where customers select an item name from the item table. The customer can only select one item.

So what I need to do is update the ItemsRemaining field by -1 when the member selects that item from the dropdown.combo box on the form.

I have looked into update queries but I can only update every single Item's quantity by -1 and not a specific item a customer chooses.

Thanks for any help.

Benn.

View Replies


ADVERTISEMENT

General :: Update Main Form Field Value After Updating Field Value In SubForm?

Feb 12, 2015

I have a main form and a subform.

Both forms have the field called JobID in common.

Both forms have a field called JobStatus.

Any easiest solution so that After I Update the field called JobStatus in the subform, it changes the field called JobStatus in the main form to the value which was selected from the subform?.

View 3 Replies View Related

Modules & VBA :: Updating A Field In A Form Based On Another Table Field

Sep 13, 2013

Using Access 2010. Fairly new to automation and macros.I have two tables (tblProductReceived and tblBins) and a form (frmProductReceived).A field in tblBins corresponds to a location the bin is at (named BinLocationID) and the tblProductReceived table tracks product that a specific bin has received.

What I need is for the tblProductReceived field PRLocationID ([tblProductReceived].[PRLocationID]) to be automatically populated with where the bin is at ([tblBins].[BinLocationID]) when selecting a specific bin in the form (frmProductReceived).

View 1 Replies View Related

Modules & VBA :: Loop Through Tables Updating Field In One From Field In Other

Feb 6, 2015

I have 2 tables, "Counselors" and "Appeals". There are several names in the Counselor table but it is not a fixed number of names (rows) usually around 7. There is also some variable number of records in the Appeals table, could be 0, could be 50, depending on the day.

I need to, in a round robin fashion, assign the counselor names one by one to the records in the Appeals table. How to loop through the 2 tables and update the name field in the Appeals table with the name in the Counselor table.

View 1 Replies View Related

Updating A Field Base On The Value Of Other Field In The Same Table

Jun 27, 2005

I have an access table call "Department" and two fields calls "DSec" and "DCode"
like this

DSec --------DCode
50 --------70.1587
60 ---------80.6987
80 ---------60.8521
70 ---------50.1512I like to make a query so that
DSec -------DCode
50 --------50.1512
60 --------60.8521
80 -------80.6987
70 -------70.1587Please Help
Thanks

View 14 Replies View Related

Updating Field In Table From Webpage Field

Sep 28, 2012

I have a Contact table and imported data into it from another Access Contact table. All but one field inserted correctly - the "Notes" field from the table I was importing FROM was inserted into the WebPage field of my current table. So now I am trying to update my Notes field in the Contact table from the WebPage field in the Contact table - or move the data over rather. I created an update query but when I try to run it it is asking for the Notes and WebPage parameters.

View 3 Replies View Related

Replacing Date Field After Updating Different Field?

Mar 11, 2014

I can't seem to get my date field to update to today when I add information to another field.

My table has a lookup field, date field, text field, text field, text field.

I have set the date field to default to today for each new record.

I work with this table as a subform.

I would like to have the date field update to the date I go back to the record and update the first text field.

I have tried using after update, and an if - then statement, but nothing seems to work.

View 10 Replies View Related

Updating Field

Mar 21, 2006

I have a form with 2 date fields, one contains the date a course was attended and the other (onclick) inserts a date 1 or 2 years ahead to show when an update is due.

I have just added this second date field and was wondering if it is possible to run the code for existing entries rather than clicking each field?

View 4 Replies View Related

Field Not Updating

Aug 10, 2006

hi folks... I wonder if I could get a little more help with my database, since you all have been so helpful in the past. I'm on the home stretch here, but one of the simple things is stumping me.

I have a form named [Payroll] which is supposed to calculate total commissions for our employees automatically. I've done the hard parts of filtering the data by repID and by install date and then sorting the products sold out by commission. all I'm trying to do now is give a grand total at the bottom of how much commission this employee has earned on this paycheck. Sound like a simple sum operation to me, but I've tried several different iterations of the function in my control box, and all of them yield a blank box. It's like the field isn't updating or something... I'm completely at a loss as to what's going on here. I'll attach my database here if you'd like to take a quick look... maybe someone can see a problem that I missed.

thanks in advance!

Lana F Call14497

View 3 Replies View Related

Updating A Field In A Table

Jan 28, 2007

Dear all,

I have a simple database with few tables for which I created forms for the user to enter data.

I craeted in one ofthe forms a ombobox that reads from a table (list of suppliers fro example). I want the user to be able to select a supplier name and then this selected name will be fed to another table (order form for example). I did all requested work as I could understand biut the end results is that it writes only the corresoponding ID number (e.g. 3) of the supplier and the supplier name itself (text).

Am I doing something wrong or missing a code?

appreciate helping a newbie

regards

View 3 Replies View Related

Updating Field In Table

Jun 19, 2005

I have some data in a field with text type. I want to update some data in the field basing on a criteria by adding text to existing field by using update queries.For example suppose I have "rs" in the field . I want to add "D" to the field then it becomes "rsD". pl. tell me how to do this? or which functions should be used in the queries.

View 4 Replies View Related

Updating A Field With The + As Part Of The Value

Jun 12, 2007

Hi all,
I am trying to update the value of a field from say, "Word" to "Test120+". I am using the SQL code as below....

UPDATE tblTable SET tblTable.Field = "Test120+"
WHERE (((tblTable .Field)="120") AND ((tblCurrent.Field02)="TT"));

But the end results are that the value has been changed to just Test120 !! The plus (+) sign has been excluded. Is there anyway I can force the plus sign to be used in this update query or has Access some sort of bug because the plus sign is used as an arithmetic character that prevents it from being used as a value in a query ?

Any workarounds or advice greatly appreciated.

Thanks in advance,
Mitch....

View 4 Replies View Related

Updating Field When Inputting Into Another????

Feb 2, 2005

Hi there

I have a database that has two tables.

Table 1 is called applications and table 2 is called contacts.

Table 1 has two fields that relate (not through the relationships) to table 2.

These fields are named thus: Officer and ContactTelephone

Through a form I wish to be able to do the following.

When I choose the Officer from the drop down box (combo box tied into Table2) it will then automatically put in to ContactTelephone the necesary number.

It MUST drag the info from Table 2 and place in to Table 1.

Any ideas :confused:

Thanks :D

Jools

View 7 Replies View Related

Updating Another Field From Aonther One

Apr 15, 2005

hi

is it possible to update a field after exit from another one?

i have a purchase order form (main) with employee id. i then have a sub form (datasheet) that can have unlimited products relating to that purchase order. I would like the employee id once entered into the main form to auotmatically update the employee id next to each product in the sub-form (datasheet).

the thing is the products will not get entered until after the main form has been filled out so the products rows in the form will not be created on exit from the main form until they are physically enetered.

I want to do this as on another form (the actual product form) which splits the purchase orders into the products - e.g. product 1 has had orders from 10 different purchase orders and i would like to see which employee ordered to stop them taking for than they ordered.

Ther main product form has a subform (datasheet) taken from the sub form in purchase orders (transactions).

I am new to this so any reply would be appreciated with a newbei reading the reply in mind.

many thanks

View 4 Replies View Related

Updating Default Field Values

Jun 29, 2005

I have 100 records in a table with a field that does not have a default value specified. If I specify a default value is there an easy way to have all the records updated with the new value without writing an update query?

View 2 Replies View Related

Updating A Field Based On A Certain Criteria

Nov 6, 2006

Is there a way in a query (using SQL) to go to the first record to update a field based on a criteria ?
For example if my amount field shows two amounts for $300.00 I want to go to the first record that has $300.00 to update a field in that record.

Is that possible?

View 9 Replies View Related

Updating A Field To Current Date

Feb 18, 2005

I have a form named 'Race'. It uses table 'Tasks'. I want to click a command button and have the 'Completed Date' field updated to the current date.

Can anyone tell me how to code the command button?

Thanks!

Sunny

View 2 Replies View Related

Updating Information Into A Field Automativcally ?

Jul 30, 2006

Hi Folks

I’m a newbie here, so as usual it’s always followed by a plea for help.

I’m From Scotland (live in Engerland)

I used to dabble with access in 95 and I can see it’s changed quite a bit.

I need a logging system for keeping details of faults that we have passed to various departments/

When we send an email I want the guys in my team to update the database with what ever they have sent. (This willbe a cut and paste action)

I want the database to have each entry with the following format


=============================
Updated by Jimmy at 19:33 on 27/7/06

I email John the following information:-

BLAH BLAH BLAH
BLAH BLAH BLAH


=============================

So everything in red above , is what will be pasted by the NEW Update buton, It will put the username , date and time of the update in between some other charaters (============) so that when we print the record as a report we can easily see all the updates as they will be between the dotted lines etc

So they are just update the same field all the time, appending data to the top of the record.

So maybe when the database starts it will ask the user his name, so that if makes any updates, it will use this name that he entered in. The date and time ect are the date and time, at the time of the new entry.

I made an example database and you can see a screenshot below:-

http://putfile.com/pic.php?pic=main/7/21006484313.gif&s=f10

My problem is, that I unsure how to complete this task?

Can anyone help me with this?

I’m no good at programming, so it needs to be simple for this simple user :D

Many thanks for any assistance or pointers you can give me

Ive also attached a sample databse.

Many thanks folks

Jimmy

View 4 Replies View Related

Updating Field By Command Button

Oct 22, 2006

Hi all

I have searched the forums and tried various options but I get an error message about the syntax.

The button is to run a SQL query to update a field by calculating on the value of a another field on the form. The query is
DoCmd.RunSQL "UPDATE BatchPayments SET BatchPayments.[GST Amount] = (BatchPayments.[Net Amount]*0.1) WHERE BatchPayments.BatchPaymentsID=" & Me.BatchPaymentsID&";"


The error message is a compile error where it is expecting a list separator or ).

Probably simple but it has got me beat.

Any help will be appreciated.

Regards

View 3 Replies View Related

Updating Another Field Upon A Selection From A Combo Box

Feb 28, 2008

Hi,

Im trying to get one of combo boxes to update a field automatically.. There are two choices in this combo box "Gatwick" and "Woking" what i need is when one is selected the JobNo field will update itself to GWO-(the first Unused JobNo) Ive used some VBA to make atleast the GWO- or WWO- appear and it works, but i have no clue as to how to get the next unused order number to appear after it.

This is what i have so far:

Private Sub JobLocation_AfterUpdate()

If Me.JobLocation = "Gatwick" Then

Me.JobNo = "GW0-"
Else
Me.JobNo = "WWO-"
End If

End Sub

Any help would be greatly appreciated.

Cheers

Marc.

View 4 Replies View Related

Updating Unbound Field On Form

Nov 4, 2005

I have a form with a bound combo box. There is an unbound text box for display purposes only that is supposed to reflect the third column of the combo box for the current record.

I set it's default value at [cmbPartyType].[Column](2) .

It works for the first record. but when I scroll through the records, the box keeps the value that was appropriate for the first record. how can I get it to look at that combo box on every form? Even if I am not update records, just looking at them?

View 3 Replies View Related

Updating A Composite Key Field In A Table.

Oct 9, 2006

I will try to explain my problem.
I have a composite key in my table....(i.e. 2 primary keys), when I do an "update" querry through a form and try to update just one of the primary keys, it adds an entirely new record to the table with the updated primary key field.

What I want to do is to be able to update just one of the pirmary keys in the same record (i.e. without adding a new record)

Is this possible?? How?

View 2 Replies View Related

Updating A Field On A Form-why This Works

May 29, 2007

hi,

I just want to understand why this works. I have some fields on a form that I'd like to let the user change. If I put something like "rs.update me.first, trim(me.first)" in the form's event procedure , "on update" why doesnt it like it?
I moved the same code to the field's on dirty event and it is ok. I don't understand why it doesn't let me update one field on the form's event. (Oh, my records can be selected by a drop-down or by navigating with the record selector.)

thanks a lot!

View 4 Replies View Related

Forms :: Updating The Field List?

Sep 20, 2013

i have created a form and its working correctly. however i have just been informed some of the fields needed deleting and different ones put in their place. so im just wondering if there is anyway to updated the field list so i can just add the new fields without having to recreate the whole form.

View 1 Replies View Related

Forms :: Updating One Field On The Result Of Another

Jul 2, 2013

Updating one field on the result of another, again this I can do BUT how do i get it to do this for all records? I have tried the on load property but it only updates the first record?

View 3 Replies View Related

Modules & VBA :: Update SQL Only Updating Field Value To 0

Nov 20, 2014

When I try to run a simple update query written in VBA I get no errors but the field that I am trying to update just gets a 0 instead of the appropriate ID that I am passing.

Code:
Function ExtractProjects()
On Error GoTo ErrHandler:
Dim db As Database, rs As DAO.Recordset, rs2 As DAO.Recordset, var() As Variant, i As Long, qdf As DAO.QueryDef, ii As Long
Set db = CurrentDb

[code]....

The funny thing is if I run the query itself it works by using a parameter query but when I try and run it like this all I get is 0's in the field that it's supposed to be updating.The field [(SDSK) Charges Master].PID properties are as followed and is a linked table:

Type: Integer
Indexed: Yes (Duplicates Allowed)

A debug.print of the results of the query trying to be ran is the follows:

Code:
UPDATE [(SDSK) Charges Master] SET [(SDSK) Charges Master].PID = 1 WHERE ((([(SDSK) Charges Master].[IBB Date]) Between #10/24/2014# And #11/19/2014#) AND (([(SDSK) Charges Master].[Charge Num]) Like '*BAA*' And ([(SDSK) Charges Master].[Charge Num]) Is Not Null));

As you can see it is providing a number to be set to but instead it just fills it in with a 0.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved