Forms :: Update Form / Query Without Updating Underlying Tables To Query
Jul 23, 2015
I have a form which will be used as the basis to print a label.
It is bound to a query and when I open the form I pass over a 'where' condition to return 1 record. I then use the query to produce a report/label.
What I want to do is to update the form/query without updating the underlying tables to the query.
View Replies
ADVERTISEMENT
Jan 6, 2012
I have created a 'junction' table between 2 many to many tables:
Jobs table (details all jobs)Jobparts table ('junction' table details Job ID, Part ID, quantity and unit price)Stock table (details all stock).The fields Job ID, Part ID and Unit price are each lookup fields from the corresponding fields in the jobs and Stock tables with quantity being a manual entry. This works fine.
I discovered you can automatically populate the unit price field using autolookup based on the entry of the Part ID field on the form. However having amended some pre-existing jobpart details randomly on the form when I checked back to the table they had not updated. Similarly when creating new entries while the form 'unit price automatically updated on entry of the 'Part ID' these details did not feed through into the table.
I assume it has to do with how the table was originally set up the field properties will need to be changed.
View 7 Replies
View Related
Jun 18, 2014
I have an "Returns" master form that contains two subforms. The subforms contain items that we are returning back into our inventory. The underlying queries in each subform show only those records where the "Return Date" is null. The query(s) works fine, except that if there are 3 items that need to be returned there are 3 records that show in the master Returns form. I tried the Totals option in the query but the I need that Return Date on the subform. I only want one Returns master form to show the 3 records (not 3 records of the same master form).
View 5 Replies
View Related
Jan 8, 2006
Hi,
I've spend ages reviewing the relationships between my tables and changing my query but cannot get this to work. I've read alot of the posts on the subject also but trying to apply the suggestions to my problem hasn't worked.
It is a database of engineering drawings. A drawing can have one or more revisions. I have written code to import the drawing and revision info into the datebase so when the drawings are actually received I need to be able to add the additional data in tblReceivedDrawings such as the tracking number, date received etc.
These are my tables:
tblDrawingRegister
DrawingNum (PK)
DrawingName
tblDrawingRevisions
DrawingNum (PK)
Rev(PK)
LatestIssueDate
ElectronicCopy
OrderNum
DrawingStatus
tblReceivedDrawings
DrawingID (PK) auto-num
DrawingNum
DrawingRev
DateReceived
ActionCode
TrackingNum
I have created a query called qSelDrawingsAndRevisions which combines tblDrawingRegister and tblDrawingRevisions.
The form is based on a query called qSelIncomingDrawings. This query joins qSelDrawingsAndRevisions and tblReceivedDrawings. It shows all the records from qSelDrawingsAndRevisions and related records from tblReceivedDrawings and is joined on the drawingNum and Rev.
Adding the extra info e.g. tracking num, date received etc about drawings that are in tblDrawingsRegister works fine. However if I want to add a completly new drawing I get an error message:
"The Microsoft Jet database engine cannot find a record in the table 'tblDrawingsRegister' with key matching field(s) 'qSelDrawingsAndRevisions.DrawingNum'
How can I get it to update the drawingNum in tblDrawingRevisions and tblDrawingsRegister at the same time?
Is it an issue with my query or relationships?
Or do I need to write an OnUpdate procedure for the DrawingNum textbox so that it created a new record in the DrawingsRegister table to correspond with the one in the DrawingsRevisions table?
I have a feeling that this might be overcomplicating it and that I just need to change the query?
Am very confused about how to approach this and would really appreciate a few pointers...
View 12 Replies
View Related
May 1, 2014
1) I Created a button that imports data into a table (Hours)
2) I created a query that finds duplicates in that table
3)I created a form put the button on said form
4) I dragged my query from explorer window onto form
5) I click button, code runs to import data into table however query on form doesnt update, I have to close and then re-open the form, obviously this is no good.
View 1 Replies
View Related
Dec 6, 2005
I have a form which is based on a select query that brings together 2 related (one to many)tables. When I keyin data to the form it does not update the corresponing table.
Is it possible for a table to be updated in such a way, or do I have to create a form based solely on the table(s) without using a query?
View 2 Replies
View Related
Oct 28, 2005
I have an update query (see attached jpg), but it is not updating. I am running Office 2000 on Windows XP.
Any ideas on where the error is?
View 3 Replies
View Related
Apr 17, 2015
I have two forms, both of which have a field called JobID (Form A is the primary Key and Form B is the linked field - Relationship: One to Many).
Form A = FrmJobs
Form B = FrmPurchaseOrders
I have put a command button on Form A. When I click the button I need it to open Form B and then automatically fill the field JobID in Form B with the same value in Form A from which it was opened. I have tried the following:
Private Sub Command214_Click()
Me.Refresh
On Error GoTo Err_Command214_Click
Dim stDocName As String
Dim stLinkCriteria As String
[code]...
The above code works on my old database but not on my new database. I get the following message "Object does not support this property or method".
View 6 Replies
View Related
Nov 3, 2005
I created an update query that says it has successfully updated 600 records, but when you go into the table, it has not been updated. I am working with an .mde. Does that make a difference?
I first created a select query to find everyone in TX. Then I changed it to an update query to change all TX to CA. Since it did not update the table, I tried running the update query again and this time it says there are not records to update (since it uppposedly updated my 600 records).
Your help is appreciated.
View 1 Replies
View Related
Mar 7, 2008
I have one table, I want to update multiple fields in that Table with values.Currently I have on update query for each update.So for exampleRows: Commercial Quotes, Cover Notes, Personal QuotesWill have the values: Yes, No, Yes in them.I need to update those fields, if they say Yes to Commercial Quotes, Cover Notes or Personal Quotes depending on the field obviously. And blank them out if it says No.Currently I have 30+ different queries I have to click individually one after the other to update each row. I was wondering if theres a quicker way of doing this all in one hit.I have a tiny bit of SQL knowledge.So one of the queries I've figured out I've converted to SQL but again it only updates one instance...UPDATE Enabler_Data SET Enabler_Data.[Commercial Quotes] = "Commercial Quotes" WHERE (((Enabler_Data.[Commercial Quotes]) = "YES"));I tried whacking an OR replacing the ; and repeating that statment replacing Commercial Quotes with Cover Notes but it errored out on me.This is where I get completely stuck and my meagre knowledge fails me so any help would be useful.Thanks in advanceMatt
View 14 Replies
View Related
Aug 24, 2006
Hi
I have imported 8000 records into a table called competency.
the table does not have the emp id, but needs it. I have a table called employee information which has the emp id as the primary key. I want to create a simple update query to copy the emp id (autonumbered primary key) field from the Employees table to the (now blank) emp id field in the competency table.
I created a query in design view, added the two tables
included the fields from Competency, Emp ID, Last Name, First Name and in the update field for Emp id I added this
"copy[tbEmployeeInformation].[empid]" In the criteria field of last name I typed a name and ran the query, it gave me the correct amount of records to update, but when I ran it, it gives the type conversion failure error. I checked the fields and they are the same in both tables (type, length, indexing)
What am I doing wrong?
Marlie
View 6 Replies
View Related
Sep 24, 2014
I'm trying to resolve a problem with a form displayed as follows
MainForm
-->SubForm1 embedded in main form
--->SubForm2 embedded in SubForm1
When I edit subform2, then return to the mainform and edit a field on the mainform, I get an error.
'The data has been changed. Another user edited this record.... Re-edit the record.'
My understanding to resolve this is to do a requery. So I added:
Me.Parent.Requery
Me.Parent.Parent.Requery
as part of the LostFocus event for subform2. However, I now get a Write Conflict error when returning to a field in the main form. I get a dialog box with the option to Copy to Clipboard or Drop Changes. I can select Drop Changes and it will let me edit the main form afterwards.
This is Access 2010 over SQL. how to get the main form to accept the changes made to the underlying subform?
View 8 Replies
View Related
Jun 28, 2013
I have a form that I call the AdminForm. It allows the user to store administrative information about the business; business name, address, telephone number, etc. I also have as a part of the table that stores this information an Attachment Field where an image of their logo is stored in a field called, [Logo]. No problem here. The issue is that I want to use the [Logo] field elsewhere like in reports.
I've added an Attachment type control to the report and I've used DLookUp to use the image stored in the admin table, but it doesn't display on the report. There isn't any relationship between the admin table and any report so I can't join them unless I do something "unnatural" by adding a fictitious field to every record to tie it back to the key field in the admin table, (there is never more than one record in the admin table; I ensure that). That doesn't seem like the right way to accomplish this.
View 9 Replies
View Related
Dec 17, 2006
Hi,
I am trying to implement an update query per the instructions at http://support.microsoft.com/default.aspx?scid=kb;en-us;127977 to append records from table2 to table1.
I would like to add a criteria here saying update (and append) only records that match the criteria table2.dateofreview <= #12/17/2006#
This does not seem to work. The same query works without this criteria.
To test this, I created just one record in table2 (table1 is blank at this time) and manually entered the dateofreview as 12/17/2006 and tried to execute the query. It is not able to show any records.
Won't this query work *with* a Criteria?
View 1 Replies
View Related
Nov 1, 2012
I'm running an update query that's based on a select query (that runs some calculations). The update query is updating ALL the rows that should be updated with the information in the select query with data from the final row in the select query, and not on a per ID basis as I think I have it set-up to do. The data looks correct in the update query, but again it's not coming out right.
Here's the SQL for what I've written so far:
UPDATE [Customer_Data Query], Customer_Data INNER JOIN Baseline ON Customer_Data.ID = Baseline.ID SET Baseline.[Unit Hours] = [Customer_Data]![Dur_Days]*[Customer_Data]![Dur_Hours]*[Customer_Data]![Number_Units], Baseline.Availability = [Customer_Data]![Perceived_Avail], Baseline.[Hours Available] = [Customer_Data]![Dur_Days]*[Customer_Data]![Dur_Hours]*[Customer_Data]![Number_Units]*[Customer_Data]![Perceived_Avail],
[Code] ....
I've also tried to force the update to the proper row by adding a criteria based on ID.
Select query, here it is:
SELECT Customer_Data.ID, Customer_Data.Data_Set_Version, Customer_Data.Number_Units, Customer_Data.Perceived_Avail, Customer_Data.MTTR_MTBF, Customer_Data.MT_TR_OR_BF_Hours, Customer_Data.Utilization, Customer_Data.Percent_Scheduled, Customer_Data.Sched_Percent_of_PM, Customer_Data.Sched_PM_Duration, Customer_Data.Sched_CBM_Duration, Customer_Data.Sched_CBM_From_PM, Customer_Data.React_Detect, Customer_Data.React_Rework, Customer_Data.React_False_Alarms,
[Code] ....
View 3 Replies
View Related
Jun 11, 2013
I have data that needs to be entered. It is the same data across 3 tables but only for the first three columns, then it is different. I can create a form for one of these but not for all three.
View 4 Replies
View Related
Sep 28, 2014
I have a form that has a check box on it. For some reason the check box is not being checked when an update query is run prior to load. I issued the 'Me.Requery' command after the update query is run (via 'On Load' and 'On Open' in the 'Event' property . . . neither worked) of the form. Is this the correct way to refresh a form after an update query is run ?
View 8 Replies
View Related
Sep 11, 2013
I have a simple form with a combo box linked to a field on a query and command button with vb code to open a report based on the value of combo box. The command button also includes code to requery the value of the combo box so that what was already generated in the report will not display when generating another report. Since the requery is tied to the command button, there is a delay in requery of the combo box vallue unless I click the command button twice to remove the report already generated. how to apply the requery to the combo box so that when I click my comman button, the requery process will work without me having to click the command button twice?
View 1 Replies
View Related
Jan 4, 2005
Good Afternoon--- I'd like to use a query to update a table, however the query is based on several tables. I'm pretty sure this is possible, but I've only used a pre-existing query where this applied. Never had to build one like this from scratch.
Say for example you want to update the contact information for one record that occurs in several different tables without openning every table. I'm not sure that I should even be using a query to solve this problem, but any suggestions would save me a lot of time.
Thanks!
View 1 Replies
View Related
Feb 27, 2015
I have a continuous form that is using a select query to populate all of the bound controls. The drop downs and text boxes are displaying the values from the correct places. But, the form is not updating in the places I expected.
The select query that is being used to populate, combines information from 3 tables.'TimeEntries' table (the one that I want records to be updated in). This holds employee ID, and numeric values for Project Name and Project Task.
'ProjectInfo' table (nothing should be updated here). This table holds other details about the project (ex. Project Name) that is used to populate a combo box.
'ProjectTasks' table (nothing should be updated here either). This table holds details about project task (ex. Task Description) that is used to populate a combo box.
The issue I am having is that when records are updated on the form, they are adding records to all 3 tables that are a part of the query, instead of just updating the time entries table.
Record Source (form) = Select Query "EmployeeTimeEntry"
View 14 Replies
View Related
Jul 17, 2013
I'm trying to update a record in a table, from a query that is run as part of an event from a command button on a form.
I have a table called 'Assets', a table called 'Disposals', and a form called 'Disposal Entry'. I would like the user to select an Asset ID from a combobox on the form, then when the button is clicked it adds a record to the 'Disposals' table, and updates the Status for that specific Asset in the 'Assets' table to "Disposed".
It adds to the Disposal table fine, but I can't get it to update the Asset table.
My query looks like:
Field: Status Asset ID
Table: Assets Assets
Update To: "Disposed"
Criteria: [Forms]![Disposals Entry]![Asset ID]
I've checked the spelling and everything looks ok.
The [Asset ID] control on the form is bound to the Assets table. If I edit the control and clear out what is in Control Source, then it updates the table and works fine.
However, I want to keep it bound as I have a subform on my home page showing the latest disposals.
How I can get the query to use the Asset ID on the form as the Criteria?
View 14 Replies
View Related
Jun 17, 2013
I have a navigation form, a navigation subform, and then a subform. When I click the save button on the navigation subform, i need the data entered in two fields on the subform to save in a table. the subform is based on a query. This is what I currently have on the the button's onClick event:
Code:
Update data_tbl
Set [data_tbl].[Approved] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![CboAppd]
[data_tbl].[Comments] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![txtComments]
WHERE [data_tbl].[ID] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![ID]
View 3 Replies
View Related
Jan 27, 2008
Have an MDE file in our equipment, it's a language data base
one of the languages isn't fully translated so I did a query to
pull out those records that equaled the English field which
brought the 1800 lines down to 218 to go over and edit.
BUT
What I am worried about, well our Software Engineers are nervous
about is my trying to udate those records via an update query
and then putting the MDE back into the machine's computer.
Is there something that I should be careful about while doing this?
I know that I shouldn't try to repair and compact as MDE just
goes bye bye when that is done, changes into an MDB file.
Appreciate any thoughts on the above,
G2
View 7 Replies
View Related
Feb 9, 2013
i want to update a field of the table from a field of query .
this is the syntax :
UPDATE tbl_PresentStockAll INNER JOIN qry_BroachStock ON tbl_PresentStockAll.ProductId = qry_BroachStock.ProductId SET tbl_PresentStockAll.Broach = [qry_BroachStock].[BalanceQuantity];
but i am getting error of "operation must use an updateable query".
View 8 Replies
View Related
Feb 24, 2005
I have a form with a Combo box, populated from table A. From this list, the user can select a item for data entry into table B. If the desired item is not found in the combo box, the user can launch another form that will allow the item to be added to table A. However, when the user returns to the data entry form for table B, the new item doesn't appear in the combo box.
I saw this problem addressed in another posting, but the solution (which required code behind an Exit button) will only work if the data entry form for table B is open :eek: . So, if the user wants to only do data entry into table A, an error will be raised when they try to exit.
Other than creating a seperate data entry form strictly for table A, is there an easier way to update the combo box on the entry form for table B?
Thank you!!!!!!!!!!!
View 1 Replies
View Related
Jun 28, 2005
Hi Guys,
I have got a query that updates details from one table2 to table1, "Reference" is the primary key and this is what the query uses to determine which need updating.
It all works great but if table2 contains a record in "Reference" that is not in table1 i just want it to ignore it, currently it just seeems to add them.
Any suggestion guys & gals?
Many thanks
Tim
View 9 Replies
View Related