Form/Sub Form Update Query?
Sep 22, 2006
:confused:
I have a form displaying individual contract information. This form is a continuous form and on each record I have a button that activates a dialog box with two text boxes to facilitate NOTES entry for the current record on the main form. When I close the dialog form - I need the NOTES text entered to be updated in the corresponding text fields on the continuous form.
I have tried the following :
1. After the dialog has closed - set the main forms Bookmark property/ Requery the form and then reset the forms Bookmark.
Problem with this solution is that occasionally I get ' Not a valid bookmark' error message.
2. In the Unload event of the dialog - I have tried Requery calls for each of the text field controls on the constinuous form prior to the dialog closing. This works fine for records that already exist in the table and the data does reflect the changes correctly. For brand new records, the updates are not reflected on the main form and the data only appears when the main (continuous) form is closed and re-opened.
Does anyone have any ideas on how to do this properly? Has someone done something similar?
Thanks
Regards
GUIDO
View Replies
ADVERTISEMENT
May 8, 2006
Hi
I have a db here, and I need to know how to update the subform if the main form changes. The main form is set up and the subform is set up.
Can anyone help
View 1 Replies
View Related
Nov 3, 2004
I have a Table(Products) and a Field(Price).
A Form(Quotation) which is based on a Query. I use a text box where the Control Source is a Dlookup function which is
gather the Field(Price) depending from the selection of the Product.
This is done in order, if the Field(Price) is updated, then the quotation has the old values of the Prices.
But i need somewher to store the Price.
How a Query can store a value from the Form(Quotation)?
In the Northwind example this is possible but how?
Any idea?
View 1 Replies
View Related
May 2, 2013
Is it possible to run an update query from a form? I have a form that brings up a drop down list of peoples names that are sorted by date of last work. When the person has worked the new date is entered. Is there a way that I can then push a button and a query would run that would update the table with the new date and only the employee that worked. So only one line on the table?
What would the query look like?
In the table there are multiple fields but I only need to update [Last Worked] with the corresponding [Employee Name]
View 13 Replies
View Related
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 14 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
Mar 27, 2014
i have two tables one is "empdata" and other is "consolidate data".In consolidate data ,i have all personal and salary data for one year of each employee but i update some employee data in empdata now i want to update each employee updated data to update in consolidate data. i want to do it with update query which run with form,is form i want create 2 combo box, 1st is employee name and 2nd is field name(which to be updated i.e. Date of birth)now i have one text box (in which i enter the value for update in employee data i.e.04/05/1976(date of birth)).how can i link this form to my update query as
1st combo box value is equal to creteria,
2nd combo box is equal to field in consolidate
and text box is value for updation...
View 5 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
Mar 20, 2015
I am developing a Task database.
Table: TaskT
Fields include; Description, Action, DueDate, Priority, Precinct, Recurring and Employee.
Query: TaskQ
Form: TaskF and TasklistF
The forms are fed by the TaskQ query.I have sort and filter on all fields except date field which i would like to have 3 buttons which will dynamically update the criteria in the TaskQ DueDate field. Is that possible or the way to do it??
The buttons would include 'Due today' 'Overdue' 'Next 7 days' and they update the criteria in the TaskQ query and hence filter with the following;
Date()
<Date()
Between Date () And Date()+6
View 7 Replies
View Related
May 22, 2006
Hi all, I'm so tired of looking... please help me!!
I have an Access Data Access Page based on a query which is not updatable.
The query is based on a many-to-many table (e.g. OfficeProducts with foreign keys for OfficeID and ProductID and an Amount field). The query is not updatable as I have included outer joins to the Office and Product tables to get all their records back.
(I'm not sure if I've done this the best way, but need to be able to list all the possible Products for each Office whether they use them or not.)
I want the user to be able to update the Amount field, so e.g. if it is currently set to 50 to be able to change it to 40, or if it is currently null (as there is no record so far for that OfficeProduct) then to insert a record into OfficeProducts with the OfficeID, ProductID and Amount value entered.
I thought this would be straightforward by creating a new textbox in the same section as the current Amount field, calling it NewAmount and letting the user update this, fire an event trigger to either update or insert into the table, and refresh the query and record on the form/DAP so that Amount shows the newly updated/inserted value.
I have been searching for ages... cannot locate either the best event or events to use for this nor the code to enter!! Please please help!!!!!
(This is actually for a charity helping people suffering from emergencies in developing countries, not OfficeProducts, so your spot in heaven will be reserved if you can help ;) Thanks)
Jen
View 4 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
Jul 17, 2012
I created a main form containing list boxes and a subform. What I want to do is to select items in the list boxes. Then, by clicking "Search" button, the data filtered by the selected items will be shown in the subform. But the subform cannot work and show the query results. I think I miss some VBA codes.
Complaint Database_William.zip
View 1 Replies
View Related
Jun 13, 2006
I am very new at Microsoft Access. I have two forms, A and B, that are filled out by two different users. Form A gets filled out first than form B gets filled out. Each has a name box as well as a birthdate box and a few other similar text fields. However, each form also has a few distinctive fields. I was wondering how I could input the common information in Form A to Form B so the user of Form B does not have to spend time retyping the name and birthdates again. In other words, I want to synchronize the similar records between the two forms. I would like the values to appear in a table as well. I would greatly appreciate it if someone could help me with the visual basic code. Thank You.
View 1 Replies
View Related
Sep 11, 2014
I have a data entry form which have a date field.This field retains the existing date after the record is saved with vba after update event.
Private Sub Form_AfterUpdate()
Me.ProductionDate.DefaultValue = Chr(35) & Me.ProductionDate.Value & Chr(35)
End Sub
Almost after a year of perfect working i am facing a problem.When i save the record , in date field my date and month values are reversed if date is between 1-12.although my database stores perfectly valid date. for example if date is "10-09-2014" (dd-mm-yyyy) after saving form date field becomes "09-10-2014". but if date is "13-09-2014" The date form field retains this value .
View 2 Replies
View Related
Sep 17, 2014
What is the best way to accomplish this? I have a database that split into the Front end and the Back end. The form that the users entering the information uses the queries from two sources. One is the a table within Access and the other is an excel spreadsheet that I link to it. How can I update /replace the Excel spreadsheet while users are using the form of the front End?
View 9 Replies
View Related
May 24, 2005
I apologize if this has probably been asked countless times; however, in my search of this forum I could not find something that seemed to work for something so simple.
**************************************************
Scenerio:
I have 2 forms. The first form is my main form and the second form is my "popup" form. Both of these forms access the same table. In my main form I have it so people can not enter in a ID so it reduces accidental data entry. Therefore, I created a "popup" box that allows ID entry.
Everything works great except when I close out of the popup form, the newly entered data is not available unless I close the main form and reopen.
Million Dollar Question:
How do I refresh or requery (dunno the correct term usage here) the main form to reflect the addition I made in my popup form. I would like the refresh event to happen when I click the close button on my popup form.
**************************************************
Again, I know this is probably simple, but I cannot find it anywhere or most likely I am blind :cool:
Thank You
View 1 Replies
View Related
Aug 27, 2013
I have two tables - Interviews & Placements.these tables have multiple foreign keys which pull information from other tables (CandidateID,ClientID etc). I have designed queries and forms (datasheet view) which display all the values that I need, For example:
The interview form shows the following fields:
CandidateName;Company;consultant;1stInterviewDate; 2ndInterviewDate;Offer;Accepted
the placements form shows the following fields:
PlacedCandidate;Company;Consultant;PlacementDate;F ee;
This query "qry_Interviews" populates these forms using the foreign keys:
CandidateID from candidates table
CompanyID from companies table
consultant from consultants table
Ideally what I'd like to happen, is when the "accepted" field is updated on the interviews form, the placements form opens as a pop up and is auto populated with the values (CandidateName;Company & consultant).So far I have tried setting the value directly, i.e on the "on Open" event of the Placements form I entered:
Me.Txtcontactname = Forms!ISISnavigationMain!navigationSubform.Form!DS .Name
This does not work. Should I be populating the placements form with the actual Foreign key values rather than the resolved names? Ideally I'd want the pop up placements form to display the actual names rather than just ID numbers.
View 4 Replies
View Related
Sep 20, 2012
I have a table called input and a "form" input made on top of that same table. When I input the data on the form it updates properly no issues.
I have another table main. i update the vendor name using combo box from main.
It works like that.
SELECT main.[Vendor Number], main.[Vendor Name]
FROM main;
And I update the vendor name using control source =vendorname.column(1)
I have even achieved the same thing using DlookUp .
The problem is that it saves on the Form but the data from Dlookup or from comboBox updates for "Vendoe Nmae" is not saved in input table.
View 7 Replies
View Related
Jul 18, 2015
How do you requery/refresh a form from within another form?
refresh formA from within formB in VBA?
View 14 Replies
View Related
Aug 30, 2005
Have looked for an answer using all my resources and can't seem to find an answer to this one. I'll try to explain clearly...
I have a main form ("Form 1") with a subform ("Form 2"). The form 2 has a subform ("Form 3"). The purpose of these forms is to create a customer PO. Form 1's recordsouce is the main PO table. Form 2's recordsource is a query that pulls info from a set of quote tables for informational purposes only. Form 3's recordsource is a shipping addresses table that could hold more than one address per customer. There is a "default" field that indicates whether an address is the default for a customer and a record id field that is autonumber. So...
When the Form 1 is opened, it is opened to a specific customer (based upon a selection made in unmentioned "form 4"). The default address for the customer is shown in "Form 3". This is achieved by setting a where clause in the recordsource to default = yes. "Form 1" has a record id field that is set to the value of the record id field in "Form 3". All is good so far. Still with me?
The problem I have is this: If a user wants to change the address for the PO from the default, they press a button on Form 3 and another form opens (form 5 who's recordsource is the same table as form 3's) with all the addresses for that customer in form view. I want the user to then be able to assign a new address to the po by finding the correct address in form 3 and clicking a button that says "Apply address to PO". I tried to do this by assigning the recid id in form 3 to that of the chosen record id in form 5 when the button is clicked, but I am getting error 2448 "can't assign a value...". I am completely out of ideas on what I should do. Any ideas?
View 5 Replies
View Related
Jan 26, 2015
i want to be able to create an On Click Event when pushing a command button that will run an Update query to update a record and after it has been updated that specific record will pop up on a Form and be displayed. i know a different way is to run the Update query and then have it displayed in a Select query but i want it to be displayed on a Form instead. is it possible?
View 4 Replies
View Related
Apr 25, 2013
I have 3 peices of data that I am working with: Group number, plans and benefit elections. On my form I have fields for the group number and plan and 2 queries. When I enter a group number the first query displays a list of plan descriptions for that group. From there I can enter the plan description into the form's plan field and that runs the second query to give me a list of valid elections for that plan. This all works fine but I want to make the plan selection a little less tedious. What I would like is to be able to double click the query field housing the plan description and have it copied to the form's plan field. I could use the ID instead of the plan description but I work in a production environment and very key stroke counts so I would really like to have a simple double click process.
Is this even possible? If so how would I set that up? I tried using the double click on event macro builder but it does not seem to have this kind of option.
My form contains fields for group number and Plan. The same form houses 2 querys, one that pulls plans based on the group number and the other to pull elections based on the plan field (not the plan query). Would like to double click a plan within the plan query and have that description populated into the form's plan field.
View 6 Replies
View Related
Dec 1, 2005
I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.
BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.
In either case, the main form's Dirty event is NOT triggered.
View 2 Replies
View Related
Aug 17, 2006
Group,
I thank you in advance for considering this inquiry.
From within a Form.field (based on a master table query), I desire to trigger two events; one before update and one after update.
This function will serve to document specific form.field value changes to a "log" table for review prior to being committed back to the master table.
What I'm looking for are functions, which I can use in a Macro or VBA code to facilitate a field read and copy before change and a read and copy after change triggering.
I'm sure this is absurdly simple.
View 2 Replies
View Related
Mar 21, 2005
I have a database with students off role.. and the contact we have had with these students... frmOffRole has the Students in with a button called add contact which on clicking brings up a seperate form called frmoffrolecontact which should link the admission number so when you close the information will be logged against the student... but the admission number is coming up as 0 and not linking! Any ideas??
View 2 Replies
View Related