Update Database Values

May 20, 2005

Hi
I have an access database, with around 36000 records. In one table, I need to add something to the values already in the field. Like:

Value in field:
image1.gif
image2.jpg
and so on

I need to change this value to:
images/image1.gif
images/image2.jpg
and so on for all the records.

There are 3 fields like this, each with around 30000 records.
Is there an easy way to do this? Other than copy the images ?

Thanks

View Replies


ADVERTISEMENT

Queries :: ORDER BY - Update Values In One Table With The Values In Another Using Join

Sep 18, 2013

I have a query with an INNER JOIN and ORDER BY that is working great. Now, using the same JOIN, I need to update values in one table with the values in another. I thought it would be simple until I learned you can't do an ORDER BY with an UPDATE. Is there another way to achieve the same result? If you remove the 'ORDER BY', the statement below doesn't produce an error but the results are not correct:

UPDATE TableA INNER JOIN TableB ON (Left(TableA.CDN,6))=(TableB.CDN)
SET TableA.HCC = TableB.HCC
WHERE TableB.HCC Like '241*' AND TableB.BBB = 'X' AND TableA.CCC = "1234" AND TableA.HCC IS NOT NULL
ORDER BY TableB.HCC, TableA.CDN;

View 2 Replies View Related

Using Update Query To Update Values

Oct 3, 2007

I have a database where two tables contain information that I need to update based on the 4 right most digits of a field. There are only 11 values that will need to be updated out of a large list of values. I'm not quite sure how to set up the update query so that I can do this.

View 1 Replies View Related

Update Values In Multiple Tables

Oct 26, 2005

I am developing an access db where employees are allowed to load tools from a tool store.

I have three tables: tblEmployee, tblTool, tblOnLoan.

tblTool includes a field "QtyOnHand" which is the quantity of a particular tool in store available to be loaned.

tblOnLoan is used to record which employee has what tools on loan.

When an employee loans a tool i need to be able to reduce the QtyOnHand of the tool and record the loan details in tblOnLoan.

When the employee returns the tool i need to increas the QtyOnHand of the tool and record the return against the original loan in tblOnLoan.

i have not yet been able to work out how to reduce or increase the QtyOnHand as tools are loaned or returned.

Can anyone please help?

View 1 Replies View Related

Values Changing On Import Or Update

Oct 21, 2005

Can anyone help -
I am importing an Ascii text file with decimal numbers ie (144392.26). the receiving field is defined as double with decimals set to auto. I have tried many other formats such as fixed 2 decimals, or Currency 2 decimals. In all cases the data has changed from its original value to 144392.265625 which of course rounds to 144392.27 on all reports. If I use a link to the same Ascii file the data retains its original value when it is appended to an empty table. But ... When I try to use that correct value in the appended table to update another table it again converts the amount to multiple decimals and may increase by more than .01.

Is there away around this problem.

Jim M

View 2 Replies View Related

Adding Values With An Update Query

Aug 13, 2007

Hi folks
I have what I reckon is a complex problem that I need to solve for my warehouse.

We hold replacement parts for the machines we sell. Some parts can be subsititued for others, so where we possible we use these parts to simplify our warehousing. Every day we get a file with demand for each part in and we look to see where we could move this demand to for those parts with a common alternative. When we find one we remove the demand from that part in the database and add it to the demand for the common part.

In operational terms we upload the demand file (.xls) to a table of the following structure
Date_added - Date
Part_number - Text
QTY - number

Thus the table holds daily demand by part. What I would like to do is use a update query to:
a) Identify the parts that have common parts to which they can be moved.
b) Add that demand to that of the common part today.
c) remove it from the original part (set to zero).

Idenitfying the parts and restricting to todays date is not a problem, however the additions and deletions are.

Any suggestions?

Thanks in advance!!

View 1 Replies View Related

Textbox Won't Update With New Values Of Sub-form !

May 5, 2006

I have a textbox on my main form that calculates the total of a field on the sub-form. It works well and display the correct ammount on the textbox when I load up the form, but if I do changes the values of the sub-form it doesn't update at all ! I need to close and open the form again to see the changes.

How can I update the textbox so it always reflect the values on the sub-form?

View 1 Replies View Related

Forms :: Combo Box Update Values?

Jul 14, 2014

I have a combo box linked to table shipstatus. This table has 2 columns. ShipCode and ShipName. These values are delivered, on hand, received, returned, warehouse.

I have another table named manifestdetails and a column labeled shipstatus

I would like to create a form where the user can use the combobox selections from the table shipstatus and update the column shipstatus from the manifestdetails table.

View 3 Replies View Related

Update Stock Values In Access

Nov 21, 2013

I have a database that deals with rented movies. I want a means in Access to enable the stock values of the movie to be updated whenever there is an order for a certain film and whenever its returned. I am not sure if an update query or a macro is needed for this to work and how each would work.

View 3 Replies View Related

Forms :: Update Values In A Table At Once From A Form

Feb 28, 2015

I'm making a very basic sales system for my school project and I'm currently working on the stock management part, as I said it's very basic.

My task -When the user receives a stock delivery they need to update the stock numbers. the value they need to update is the StockNumber value in the Products table. to so this I want to make a form that displays all the product names in a table with a textbox or cell next to it in which the user can enter the amount of that item that has been delivered. And at the bottom of the form there is a button which will add all these new values to the existing values.

1. There is no set number of products, the user is able to add new ones, this is preventing me from just making a separate textbox for each existing product

2. I have attached a jpeg I made in paint to illustrate how I want to the form to work as well as my system as it currently stands, there are a few unused forms and queries.

View 2 Replies View Related

Modules & VBA :: Need To Update Field Values Via Input Box

Aug 18, 2015

I'm trying to update the account number via an input box with a do loop but I don't have the code right. The at the input box, the user will type in a 4-8 digit number and it will update all the account number fields in a table that are null.

View 1 Replies View Related

Modules & VBA :: How To Update List Of Values In A Combobox

Sep 25, 2014

I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:

Dim qDef As QueryDef
Dim Query As String
Dim st As String
Dim rs As Recordset
st = "SOV"
Set qDef = CurrentDb.QueryDefs("get_query_reason")

[Code] ....

View 2 Replies View Related

Update Values On Table 1 Depending On Dates

Sep 19, 2014

What i need:I have the attached database which includes 2 tables (Table1 and Table2) which are related One-2-Many (Table1 is the One and Table2 the Many)There is one form also with the name "Form1" which includes 11 unbound (ctr1,2,3...11) and are calculated with the values of fields [MainDate] , [Days] and [EndDays]

The Issue: As you can see in the attached sample, on Table1 i can assign the "MainDate" value , the "Days" and on field "EndDays" i can have the value of the [MainDate]+[Days].

I need to update the field "RefNo" on Table1 on depending the date range of the field [EndDays] and the controls [ctr1-11]. Specifically i need : If the Date() is in the range of eg. [EndDate] and [ctr1] i need to have the value of the first record of the Table2 (RefNo) on field "RefNo" into Table1. If the Date() is the range of [EndDate] and [ctr2] i need the second record values of the field [RefNo] into Table2 and so over..

View 1 Replies View Related

String On Button To Update Field Values

Jul 9, 2013

I get an error for this code: this is the error, i can firgure out how to have the string not be the textbox, but sub in the texbox name.

Code:
myFormstr = Array("F_Value1", "F_Value2", "F_Value3", "F_Value4", "F_Value", "F_Value6", "F_Value7")
For Each mystr In myFormstr
me.cboProduct = Me.mystr
Next mystr

View 10 Replies View Related

Update Query Based On Lookup Tables Values

May 30, 2005

Hi, not sure if this is possible or the most economical approach but here goes:

I have a lookup table (tblHolidays) with a list of holiday dates (fieldname "HolidayDate") in it.

I need an update query that can check all "StartDate" values on a table called "tblMasterLog" and where this date matches the ones on "tblHolidays", will add 1 day to the "StartDate" and then keep repeating until there are no more dates to change.

Can this be done?!

Thanks in advance

View 2 Replies View Related

Query/Update Sales Values For Individual Staff

Oct 16, 2006

Hey, I am currently doing an A-level ICT project and seem to be stuck at the first hurdel. My problem being that i wish to update the 'Number of sales' field for all the staff in the 'Staff' table. I have tried serveral queries to count the number of sales, which are in the 'Tickets' table for each and indidual 'Staff ID'.
This was suscuessful although i am wondering how to transfer these values into the Staff.[Number of Sales]. Also some staff had the value of 0 so did not come up in results of the querie.
Is there any possible solution or is there a more simple way to solve the problem.
Many Thanks in advance Dan Parker

View 1 Replies View Related

Queries :: Update Query To Remove Values In Field

Jul 2, 2015

What I have a a form that my lab supervisor would use. That person selects the records that are to be modified and assigns work, completes work or otherwise updates the status of the records. One of the options is to mark a record as not having a sample here if it has already been marked as having been here. So essentially, I want to modify the record to change the sample arrival date and sample number field (which is a foreign key field) to null or empty. I have created a delete query that deletes the corresponding record just fine.I just am having difficulty updating the two fields mentioned above. When the supervisor selects the record the primary key for that record is also picked up so it is easy to know exactly what record to adjust. The query returns the information to be updated just fine, it just doesn't do that. Here is the sql of the query. As I said, I don't care if the fields are empty or null. Also the fields aren't required.

Code:
UPDATE TestRequestTable SET TestRequestTable.SampleLocation = "", TestRequestTable.SampleArrivalDate = ""
WHERE (((TestRequestTable.TestRequestNumber)=[Forms]![LabScheduleForm]![TRNumberCombo]));

View 3 Replies View Related

Modules & VBA :: Using Unbound Form Values To Update Table

Jul 16, 2015

I have an unbound form in which a user enters data relating to a credit dispute, and when they hit the Save button I have a sub that is intended to insert that data into a table. This is a bit out of my comfort zone, so I found some code from another forum and adjusted it to my needs. However, I'm getting errors.

The table name is tbl_complaints. The fields from the form are:

txtAcctNumber
txtClient
txtEoscarType
txtEoscarControl
cboMethodReceipt
....

My code is below.

Private Sub cmdSave_Click()
Dim StrSql As String
On Error GoTo ErrorHandler
StrSql = "INSERT INTO tbl_complaints " _
& "(ACCT_NUMBER, CLIENT_NAME, EOSCAR_TYPE, EOSCAR_CONTROL_NUMBER, METHOD_OF_RECEIPT,

[Code] ....

The error I get is error number 3075, and it says I'm missing an operator in the section that references cboResponseType, but I can't seem to figure out what I'm missing. My head is spinning from staring at these parentheses and apostrophes for so long.

View 14 Replies View Related

Forms :: Subform Doesn't Update After Values Being Updated By Another Form

Feb 27, 2015

I'm running into an issue with my forms. I have a form that contains a subform, that contains a list of projects. This list is read-only. To update a record, you can double click on it, which opens another form filtered on this record, and which contains the fields in the first form as well as some others.

I have a command button on that last form to "Save and close", which fires up a macro that saves the record and closes the window.

Now, the issue that I'm having is that, when the window closes and I'm once again in front of the first form with the list of projects, the values of the record I changed are not updated and when I click on another record, Access tells me there's a conflict in the values and asks me if I want to keep the changes, discard them or copy to the clipboard.

It seems to consider the old values from the first form as a change, and thus asks me which to keep between these, and the actual (proper) changes I made in the dedicated form.

For the proper changes to be applied, I need to select "Drop changes".

I tried to requery the first form, also undo the changes to it after closing the window, but none of that worked.

I'm actually basing this on one of the templates, which does exactly what I want and which obviously works...

View 3 Replies View Related

General :: UPDATE Field In Table Based On DISTINCT Values

Mar 12, 2013

Below is a sample of the table with the data. I manually added the 1 and 0 to the hc_Year field. However, I would like to create an Update query that will add a 1 to the hc_Year if its the first instance of PIDM & regsYear and add a 0 to the records that are not the first instance.

PIDM | regsYear | hc_Year
52 | 2009 | 1
52 | 2010 | 1
201 | 2007 | 1
201 | 2007 | 0
201 | 2007 | 0
201 | 2008 | 1

View 6 Replies View Related

Queries :: How To Update Combo Box Values Based On User Selection

Sep 25, 2014

I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:

Dim qDef As QueryDef
Dim Query As String
Dim st As String
Dim rs As Recordset
st = "SOV"
Set qDef = CurrentDb.QueryDefs("get_query_reason")

[Code]....

View 3 Replies View Related

General :: Update Query To Build Date Using Values From Another Field

Jan 2, 2014

What query would I use to build a date in m/d/yyyy format using month, day and year values from another field?

View 2 Replies View Related

Queries :: Update Table With Values From Field Using Results From Select Query

Sep 23, 2014

Let's say Table (T1) has fields F1 and F2. After a massive update to T1, there are some records with F1 = "" because a Dlookup using F2 as criteria to another Table (T2) resulted in a null. I created a select query to show unique T1F2 values where T1F1 = "". The user can use this query to find out which F2 values need to be added to T2.

How do I create an update query that will update T1F1 with values from T2 using the T1F2 results from the select query to again use the Dlookup to T2 (of course after T2 has been updated to contain the missing F2's)?

View 1 Replies View Related

Access Not Recognizing Numbers After Run Update Query To Revise Values In One Column

Oct 25, 2014

Access doesn't seem to recognize the values in a table I am updating. I am using an update query to revise prices in a column Titled "Price". I am comparing the prices in the Price column to the prices in another column with a simple IIF statement (i.e., IIF([Price]=[Column2Price],"Yes","No"). However, oddly, the formula produces a "No" result, even when the prices are plainly the same values, and all formatting for both columns is the same. Whenever I manually type over the price with the same value, the formula works and Access seems to work as intended. For example, I simply type "12.95" over the same value that is displaying in the column that I updated that is already showing "12.95". Then, after I do that, the formula works and produces a "Yes" value.

View 3 Replies View Related

Transferring Values Within A Database

Dec 13, 2004

In one form i have a field called "address" and if the address changes I want to - by clicking a command button or such - automatically transfer this field into a field called "previous address" on another form. How can I do this??

View 3 Replies View Related

Adding Discrete Values To A Database

Oct 16, 2007

Hi all,
can i use a listbox control NOT IN A PROGRAMATICALY way, in a table to allow user choose one of some pre_defined values (for example 1,2,4). This field will be used as a parameter in an communication with HW, that's why its crucial not to let users choose whatever value that they want.
Thank you

View 3 Replies View Related







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