SEARCH YOUR SOLUTION HERE  

Update query help

I have a table with trailer numbers currently on the yard. I also have a prompt to enter trailers as they are leaving. I would like an update query to then remove the record from the OnYard table. Is this possible

Posted On: Monday 22nd of October 2012 05:24:44 AM Total Views:  444
View Complete with Replies




Related Messages:

Automatically update/refresh/requery a subform   (276 Views)
, I have a form and on this form there sit two subforms. Subform1 Subform2 The main form and the two subforms are all linked via parent/child relationships. So that when the Data in the main form is changed, the relevant data is shown in the two subforms for the same Site. Now, I have a Button in Subform1. When this button is clicked it updates a set of data to a column in Table1. Subform2 is there to show this updated data from Table1. However, currently it wont refresh or requery automatically. I have to go to another record and come back for the fresh data to show up. What I want is as soon as the button is clicked on Subform1, Subform2 should update instantly. How can I do that I tried on the ONClick even of the button to put this: If CurrentProject.Forms("Subform2").IsLoaded Then Forms![Subform2].Requery End If That didnt work I also tried on the OnClick Event to put this: DoCmd.RunCommand acCmdSaveRecord That didnt work. Please help.
Archaeological database - Need help with update query: Replace__with___where____=____   (232 Views)
! I'm currently creating an archaeological database. Two of my tables are Artifacts and SiteName. of my sites in SiteName have an ID. I have a column in Artifacts for SiteID so what I want to do it link the Artifacts to the sites they belong to. I figured it would be something like: replace Artifacts.SiteID with SiteName.ID where Artifacts.Name is equal to SiteName.Name (i put the site names in the artifacts table as well as in the sitename table so as to keep everything in order). I've only just started using Access so its a big step for me just to understand what it is I have to do to accomplish this! Is there anyone who can show me how to do this in Access Here is what I've tried: I ran an update query, selected the Artifacts table and the SiteID field in that table. It looks like this on my comp: Field: SiteID Table: Artifacts Update to: [SiteName].[ID] Criteria: [Artifacts].[Name]=[SiteName].[Name] Unfortunately this doesn't work and I don't understand why not. It seems to make sense to me. Is there anyone who can help me figure out what I'm doing wrong I've been on so many Microsoft Access help websites but I still can't figure it out!
Forcing recalculation after an update   (139 Views)
I'm having a few issues with getting my form to update info after a variable has been changed. The form is tracking training dates with the fields "Received", "Next Due", and "Interval" (in months). If the user changes the received date, the form calculates the next due date using the interval field. I have the DateAdd function on the AfterUpdate of the Received field and it works great, but I can't get it to recalc if only the interval changes. In order for it to recalc the Next Due, the user would have to refresh the date in the Received field which would cause major problems with future reports, etc. Any assistance would be great cuz I'm already bald(by choice) so I have no more hair to pull out....
[Form] Help on how to control update of the database   (181 Views)
I have a form that have 7 field to be key in by user. And a close button. Problem faced : 1. If user accidentally press close button before complete keying the data, the incomplete form (null field) information will also be update to my database. 2. If user take a longer time to key-in the field (3 field), it will update the incomplete field (remaining 4 field is NULL) to the database. How to make control that I can only update the complete form information (7 field is not null) to my database only when i press close button Please help. I'm still new in access...
Search function and update function   (154 Views)
hi i need some help here. hope u can help me. i am quite new to access and was wondering. 1) are there ways to create a search function in which a person can locate all the information of a particular query from my database jus by querying the person's lanid 2) are there ways to update the information after i've inserted them like for example. i've inserted the information into the table and i would like to edit it as some information has been updated. are there ways to edit the data besides going to the table to edit it i'm having some problems as if i edit the data from the table. some fields can be left blank. which i do not want that to happen. 3) for my date portion, is it possible to restrict the date input like for example, the date that can be inserted into my text box could be 32 / 32 / 2008 this is wrong as there is no such day. is it possible to restrict it the 31 days , 12 months only would really need your help !
Add date to textbox after update   (215 Views)
all: I have a form in access where I do updates in different fields. The updates in these fields can be names, phone numbers, addresses, descriptions, etc. I want to populate a textbox automatically titled "last_updated_on" with the current date after I have made any updates on the form. Any ideas Thank you very much Dion
Time lag when connecting to access after updated to XP   (205 Views)
My office workstation took a very long time to connect to database in Access 2003 after upgrading to Windows XP, a few minutes need to be taken just to open a simple form which normally takes less than 10 seconds. In simple words, whenever it has to retrieve data from the db, it will be super lagging . The rest of the workstations running on Windows 2000 were running perfectly fine. The database is located on the host pc, which is running Windows 2000. Initially we suspected that it might be because of the insufficient RAM. Thus it was changed from 1GB to 2GB. But even after changing to 2GB, the problem still exists. Can anyone please advice me on how to check and rectify this problem What can be the cause of this problem
My update also inserts!!   (146 Views)
This one is very annoying... i have a button that is supposed to update a record based on the record id. when i click the button, it not only updates the record, but it also creates a new record with just the default values i have set for the table. no other values are entered into the table. here is the code that is relevant to the problem: Code: Dim DAOdb As Database Dim DAOrs As dao.Recordset Dim sSQL As String Set DAOdb = CurrentDb() sSQL = "Select * from StopwatchRecord where StopwatchRecord.ID=" & Me.hidID & ";" Set DAOrs = DAOdb.OpenRecordset(sSQL) With DAOrs .Edit .Fields("StartTime") = Me.StartTime.Value .Fields("EndTime") = Me.EndTime.Value .Fields("ElapsedTime") = Me.ElapsedTime.Value .Fields("Comments") = Me.Comments.Value .Update End With MsgBox "Record Saved" DAOrs.Close DAOdb.Close Please help! this is driving me nuts
Menu Bar updates   (139 Views)
I have a split db placed on a server that I'm currently making updates to. I have a custom menu that my users are, well...using, and I need to add a couple of options to the menu portion of it. Here's where the problem comes in, I make the appropriate changes to the db, and I have my users go to the shared drive, copy the FE, and paste it to thier desktops. When I do this on my own desktop it works fine and I can see the changes, but when the other users do it, the same old menu is there Why would it change for me and not for them Can anyone help me out
Wierd Prob: Cannot update SQL Server text-fields for some records, but can for others   (222 Views)
, I have a very strange problem: I have a table linked to an SQL Server table in my MS Access 2000 Application containing 5 text-fields (SQL Server Type, in Access seen as MEMO-fields) and several other fields (in total about 140 fields). Updating any field works fine except for some records. In those records I can only edit the non-text-fields in my application. When I try to edit one of the text-fields I get a error message telling me that another user has edited the record and i have to discard my changes. The strange thing is that this problem only crops up for some records. (1 in a 100 or so) other records work fine. Does anyone know what happens here And how this can be fixed
Use report parameter to update table upon printing   (168 Views)
I have a form in which I have a Print Report button. The button currently runs a a report I created. I have a parameter which prompts for an input for the SQL query within the report. Is it possible, upon report closure or after print completion, to have this parameter and the current date (the report is printed on) be saved in the appropriate fields within the same record set the report query just printed
How do I update Inventory in Access   (143 Views)
all, I have a form where the user enters the item purchased and the quantity - I want that quantity entered in the customer invoice to be deducted from the Quantity_On_Hand field in the Inventory table. What would be the best way to accomplish this I assume I would need to enter an expression in the after update on the quantity in the customer invoice What I have tried so far has accomplished nothing but errors.
Use usernames to update information in reports   (309 Views)
Good morning to you all. I have created a database for my company to monitor all of our cases. Within this database i use reports to create standard letters for our housing advisers to send out to clients and contractor. What i need to do now is to find an easy way to update the name at the bottom of the letters. For example if John Doe sent a letter it would automatically put his name at the bottom but if Jane Doe sent one it would be hers. After consulting with other members of staff they suggested individual usernames that they signed in on and the letters would update to reflect the user currently signed in. I wasnt sure if this was possible but said i would look into it. However a search on the internet did not yeild any results. So i am asking you good people if there is any possible way to achieve my goal Do not worry if my aim is impossible as i have a backup plan of creating a drop down box will all the staff names. WHich would be much easier to create but to make the staffs lives easier i will attempt the user name idea. Thankyou for your time
SQL Query for insert and update   (146 Views)
I have two queries to insert and update the record entries stSql = "INSERT INTO [Temperature] (AreaID, City, Code) VALUES (" & txtAreaId.Value & ", " & txtCity.Value & ", " & comboCode.Value & ")" rs.Open stSql, con rs.Close (Error occuring here) stSql1 = "UPDATE [Temperature] SET TEMP1 = " & txtTemp1.Value & " WHERE AreaID = " & txtAreaId.Value & " " rs.Open stSql1, con rs.Close I'm getting the following error "operation is not allowed when the object is closed". Can any one help me out in resolving this issue.
Multiple Forms to update One Table   (169 Views)
Help! I have a database with 4 forms that will allow the user to enter various degrees of information. FOr example, if the user answers yes on the first form, they are auto directed to the second form. However, each form is trying to create a new row on the table and what i need it to do is append to the row created by the first form! How do I make this happen Do i need the forms to be nested in each other to do this
Changing from insert to update   (139 Views)
I have code that collects a yes or no (plus IP and date) for customers subscribing to a newsletter. Originally this data was collected in its own mailinglist table, but I've moved the appropriate fields to the orders table. The original code used the INSERT INTO command. I know need to change this to an UPDATE statement, otherwise with each customer order, the mailing list info is being added to a separate row. I've tried many ways to convert the following code to an UPDATE statement but I walys get syntax errors. if NOT emailexists AND instr(theemail,"@")>0 AND instr(theemail, ".")>0 then cnn.Execute("INSERT INTO orders (email,isconfirmed,mlConfirmDate,mlIPAddress) VALUES ('" & replace(theemail,"'","''") & "'," & IIfVr(noconfirmationemail,1,0)&","&datedelim&date( )&datedelim&",'"&left(request.servervariables("REM OTE_ADDR"), 48)&"')") What I tried was: UPDATE orders SET email,isconfirmed,mlConfirmDate,mlIPAddress = '" & replace(theemail,"'","''") & "'," & IIfVr(noconfirmationemail,1,0)&","&datedelim&date( )&datedelim&",'"&left(request.servervariables("REM OTE_ADDR"), 48)&"')") Am I just missing something minor, like quotes, or is this not possible to do with that replace statement
How do I update a database with new data without corrupting data?   (152 Views)
I am an Access novice and have an issue that I need resolved asap please!! I have set up a database set up in Access which contains a number of columns, some of which update regularly. On the back of spreadsheets I receive in Excel, I will need to update some of the columns in Access. So far I have taken the columns that need updating from the spreadsheet and put them into an Access database. What I now need to do is transfer the new data into the existing database. Some records may have been deleted since the last update, some may have been added and some may just have changed information. Either way, all these changes must be reflected. Obviously I can't copy/paste because then, due to deleted / added records the rows will not match up! There is a ref no for each row which acts as the primary key in the main database. The new database I have just created from the excel spreadsheet has the same primary key. Hope this makes a little bit of sense. Help would be very much appreciated!
Retreiving updated records old data in Access File   (143 Views)
I have a VB6 application talking to Access DB. The program was suppose to do some audit tracking but due to a bug it didn't create data in Audit table. Is there a way i can retreive data which is updated (Old values) for 2 tables. If there is a tool/utility i can buy please let me know.
Macros to update table?   (134 Views)
Okay, here's what I'm trying to do... I have a form, and I want to be able to automatically log the time that users are working on that particular project. This is my thought process, and I just can't get it to work. I'm using Access2000, and I'm still somewhat new to figuring it out. 1st Time button - start time - this would be a macro that goes and updates a table that has the start time, end time, project id and an autonumber field (so it will just keep adding to the table). There would be a date & time stamp that goes into the start time column. 2nd Time button - end time - Same basic function - it would put a date/time stamp into the end time field. I want to use this to create a record to show how long the user was working on the project (end time - start time = time worked). I've tried setting up macros, and I can't get them to actually update the table. I've had little experience with macros and I could really use some help.
ERROR: Operation must use an updateable query.   (450 Views)
asp code: Code: error: Code: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. /site/content/register_act.asp, line 13 It's says it has something to do with permissions... I set writing & reading permissions for the db and the directory that contains it through contorl panel->Administrative Tools->Internet Information Services I have no "security tab" when I rightclick->properties the db file or it's directory even though the file system is NTFS in spite all these when I rightclick->properties the directory that contains the db I see a "read only" square marked in the general tab-attributes, when I try to unmark it seems to be unmarked but when I rightclick->properties again it's marked again... what should I do