Saving Subform Records

Sep 14, 2005

I have a subform within a form and the subform has the child records for the main form. When I move from the main form to the subform by tabbing the records in the main form are saved. However, in the subform after it is completed if a certain field in a groupbox is chosed another form opens up which contains records in the many side of the relationship with the first subform. The problem is that the first subforms records aren't saved because the originall form isn't closed and I don't want it closed...How would I save those subform records when the new form opens up?

Thanks,

View Replies


ADVERTISEMENT

Saving Form Data Before Going To Subform

Jun 29, 2006

And another question...

In my database I have a button on a form which leads to a subform popping up. On the subform popping up, I display data from the first form. However, unless I first save the original form and then go to the subform, the data isn't passed on. How can I make the button both open up the subform and save the form so that the data is passed on?

Again, any help is much appreciated.

View 1 Replies View Related

Forms :: Subform Not Saving Automatically

Dec 23, 2013

I have one problem with subforms. I have one bound main form and two bound subforms: one subform is used to display existing records in datasheet view while another is used to enter new records in form view, but this latter subform for new records will not save automatically, nor will it save by using the me.refresh or me.dirty=true in the unload event of the subform control. The parent child relationship is intact. I can even see the primary key of the new row in the subform but it does not appear in the table that the subform is based on. This primary key adds by one automatically.

I have struggled and finally made work a combo box in the main form that finds existing records but also is able to add new records when the value entered is not on the list. Below is the code I used. I am not sure if this code is overriding Access's save ability of the subform?

Private Sub Combo316_AfterUpdate()
Dim n As String
gblvariable = cbobox
Me.Requery

n = DLookup("ID", "[Customers Extended]", "[Customer Name] = '" & Me!Combo316 & "'")

[Code] .....

View 14 Replies View Related

Forms :: Saving Information In Subform?

Dec 3, 2013

I have a subform and I want to save the username to the bound table in this subform.

I've tried creating a textbox (CompBy) and then setting the default value to = Environ("UserName") but this doesn't work.

I've tried placing the following in the afterupdate event of the subform:
Me.CompBy = Environ("username")
DoCmd.Save
But this doesn't work either.

View 1 Replies View Related

Forms :: Subform Not Saving Data Into Table

Nov 5, 2014

I have a subform which is for payment, it has a calculated field which is called TotalPayment, with expression:

=Nz([Forms]![Reservations2]![Days]*[Forms]![Reservations2]![Rate],0);

in the control source. When a value is displayed in this field an ID number should be assigned to the PaymentID field, but this does not happen, the field remains null.

View 1 Replies View Related

General :: Subtotal On Subform Saving To Table

Jul 17, 2013

find the attached MS access DB for INVOICE printing . I am facing two issues there .

1. {form INVOICE } sub-total must be Calculated from line total on {INVOICE DATA Subform} , I know this can be accomplished by adding a new field at sub-form and calling that value to main form's sub-total field .

2. And the real issue is i want to save this value from subtotal on form INVOICE to table field name subtotal .

3.I wish to make a reporting format for each INVOICE NUMBER , whenever report is being generated , the report shows more than 1 invoice details .

View 2 Replies View Related

Modules & VBA :: Navigation Control Subform Saving

Jul 18, 2013

Access 2010. one of the forms i load into a navigation form is in datasheet view and some vba re-sizes all the columns as it loads in.

However, this then means that when i try to navigate away to another form i always get prompted whether to save the form or not.

because the form is in a navigation subform i can't use:

Code:
DoCmd.Save acForm, Form_NavigationForm.NavigationSubform.Form.Name
' or this...
DoCmd.Save acForm, "my_form"

in both cases i get an error : the object my_form isn't open

View 1 Replies View Related

General :: Split Form And Subform Columns Not Saving

Oct 25, 2013

For some reason when I change the order around of the columns in a split form or subform 90% of the time it wont save (right click save, file save, etc..) and have to constantly redo it until it finally works. Am I missing something obvious as to why this is happening?

View 3 Replies View Related

Saving Records

Dec 20, 2006

I have a form that shows entries based on other parameter values they are changing when new searches are used. I created another form that shows the entries I would like to save and they are bound to the other form. I can view the data in the second form one by one based on what happened in the previous form but when I close the first form the data goes away in the second and leaves me with a #Name?. I am trying to come up with a way to save every different entry and create continuous records on what was entered. Is there a way to have the text boxes be bound but still save the record and just create a new record for the next entry? I tried the save record option in the records menu but when I close out it is gone. Thanks.
Mitch

View 1 Replies View Related

Forms :: Continuous Subform - Validate Data Before Saving To Table

May 18, 2013

I have a continuous subform that displays lots of questions. This specific form has 10 questions on it. Each question has one answer and the users are required to select one answer for each question. I am trying to do some data validation before the data gets saved to my table to ensure that users have answered all the questions. I found some very useful code online and tweaked it to suit my needs. The validation works perfectly on subforms with only one question, as I have some other tabs that use it.

On the specific form that has the issue, the validation works as expected when no question has been answered, but when a user answers only one question and leaves the remaining nine questions blank, the validation does not work. I guess it is as a result of the continuous form repeating the different questions and ms access thinking that the data entered for one question alone is complete when it actually isn't.

Code:
Private Sub Ctl4_frm_Staff_Exit(Cancel As Integer)
Dim ctrl As Control, EmptyStr$
For Each ctrl In Form_subFrm_staffQuestion.Controls
If InStr(1, ctrl.Tag, "Required") > 0 Then
If IsNull(ctrl.Value) Or ctrl.Value = vbNullString Or Len(ctrl.Value) = 0 Then

[Code] ......

View 1 Replies View Related

Saving Records On Form

Aug 14, 2006

I have 4 tables with the following fields:

Table1 - CustID, customer information....
Table2 - CustID, VehicleID, vehicle information....
Table3 - VehicleID, PolicyID, policy number information
Table4 - PolicyID, premium collection information

The bold/underlined fields are my primary keys in the Relationship.

Everything works well, except for Table4!!! All the records encoded in it can not be saved.

View 6 Replies View Related

Help - Explicitly Saving Records

Aug 4, 2005

I am using the below piece of code behind my Save command buttons on my various forms in my db; however, it does not always save the record. It will save if we completely exit the forms, but if we just switch records after clicking it, sometimes the save doesn't happen. If anyone has an idea of where I went wrong, I would appreciate hearing it.

Code:Private Sub cmdSupSave_Click()On Error GoTo Err_cmdSupSave_Click'CHECKS TO SEE IF YOU WANT TO SAVEstrMsg = "Are you sure you want to save changes? Edits cannot be undone." If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Entry?") = vbYes Then DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Else 'IF NO, ENTRY REMAINS THE SAME Cancel = True End If Exit_cmdSupSave_Click: Exit Sub

View 8 Replies View Related

Saving Multiple Records At Once

Oct 13, 2011

I am managing a database for an academic project that requires a large amount of data-entry. In particular, there are several times when there are hundreds of identical records that must be entered. I would like to design a form that has a quantity box, so that if the person entering the data had to enter 320 identical records, they could just enter 320 in the quantity box, and then enter the rest of the data, and press the save button and then 320 identical (except for the Primary Key) records will be saved at the same time.

View 5 Replies View Related

Forms :: Values Populated From A Subform To A Main Form Not Saving To Table?

Feb 4, 2015

I am having a problem with calculated fields that are populated on the main form from the subform not saving to the table the main form is linked to.

I created a Purchase Order table that has information on what emplyee created the record, reason for order, customer information if its ordered for a customer, creation date, eta date and notes while the Purchase Order details table is for information on the supplier, product item number, product name, quantity and cost. they are linked by the Purchase Order number which is the primary key in the Purchase order table. it all looked good so i made the form with the Purchase Order Detail as the subform, i got the form all working great and how i wanted it but then i decided i wanted the supplier name and the subtotal of the cost in the main form populated or calculated by the values in the subform.

I copied the fields i wanted populated in the main form to the subform footer and added the calculation for the subtotal then added the formula to the source code on those fields in the main form so the values would populate. it all worked great on the form and the values populated as they were supposed to so i saved the record and went to look at the tables and i found that while the values in the calculated fields that I populated from the subform showed up in the form they didnt save to the table while the non calculated fields saved fine. i did some experimenting and found that if i delete the code and put the data source back to the table in the form and just type something in the text box it would save to the table but not if i had the code in and let it populate.

an example of one of the codes i used to populate the data in the main form is:

=[frmNewPurchaseOrderDetails subform2].[Form]![txtsubfrmSupplierID]

did i mess up in the code or did i do something to the relationship between the form and the table?

View 3 Replies View Related

Queries / Subforms & Saving Records

Jun 12, 2005

Hi all,

I've got this form working ok but need to add some extra functionality but haven't a clue how to do it!

The uploaded database has two main forms. The first is used to enter customer data, the second runs from a query and shows all those records that have been completed in the first form (frmCustInfo - AgentLog = Yes) but not completed in the second form (frmControlsSource - AnalystLog = No)

Then more data is input into one of the subforms (frmControlChecks). Now in order for me to see the results of the queries connected to two other subforms I have to move off the record and back to it (for the record to be saved and then the queries run)

After moving back to the record, the query results on the right (Information Only) are manually added to the last subform 'Input Two', then the user would move on to the next record and do the same.
-------------------------------------------------------------------------------------------------------------
What I need it to do then is this: When the user tabs off the last field in the subform (frmControlChecks), the queries to the right (two subforms) would run, showing the results and also populating the last subform (frmAnalystInput)

The user would then click AnalystLog and move to the next record.

I hope this is possible without redoing the forms/queries because it's taken ages to get this far :o

I've also added info in this sample database and some working data if you want to take a look...thanks for any help

View 2 Replies View Related

General :: Saving Records In Alternative DB?

Jul 6, 2012

I have a stock db with records that go back to 2006. I want to clear some of the old records but save them incase required. I still need to leave from 2010 until present on the db. I have a front and back end on the db.

View 1 Replies View Related

Lock Individual Records After Saving

May 4, 2014

what i want to do is lock each individual record created by each user from the other 3 users after they have been saved ( I am not referring to record locking/table locking while updating/creating ). ie They can all read each others created records BUT only update/modify their own created records. They all have individual passwords to log in.

View 3 Replies View Related

General :: Saving Records And Empty Comboboxes

Sep 16, 2014

I have a database that I've created for a number of clerks under me to use to track their daily tasks.

When clerks are entering their tasks, they do so through a number of combo boxes on a form (Assigned by:, Division of Law:, Subcategory:, Casename etc). When all of the combo boxes have been filled, the employee can click a button in order to save the record to the back end of the database and open a new blank record.

Currently, if an employee tries to enter the wrong data in a combo box and save the record, they will be prompted to enter data and not allowed to save the record; the problem is that if they leave all fields blank they can still save the record - thus creating useless data for reporting purposes. For example, an employee could enter their name and the date of record but leave every other combo box blank and still save the record. I want to lock the form such that they cannot save the record unless all of the combo boxes on the form are populated to reduce user error.

How can I do this simply?

View 13 Replies View Related

General :: Lock Individual Records After Saving

May 4, 2014

I have 4 users all with the same rights. What I want to do is lock each individual record created by each user from the other 3 users after they have been saved ( I am not referring to record locking/table locking while updating/creating ). i.e., They can all read each others created records BUT only update/modify their own created records. They all have individual passwords to log in.

View 4 Replies View Related

Forms :: Unable To Navigate Between Records - Custom Save Button Not Saving

Jul 22, 2013

I've been working on a database for work for the last few weeks and this forum has been a Godsend many times over, but now I have a problem that I can't find any reference to.

Using Access 2003, I have a form that uses 3 cascading combo boxes in the header to find a unique record, and a command button that brings up the rest of the record into unbound fields in the body of the form.

It works fine for finding records, but whenever I enter/change data on it, the record doesn't save. The navigation buttons at the bottom don't work - the Next/Previous record buttons are disabled, and the First/Last Record buttons do nothing.

Navigation buttons are enabled/activated in the properties.

I tried getting around this by creating a Save Record command button - first using the wizard, then using VBA code DoCmd.RunCommand acSaveRecord as advised by [missinglinq;696351], but this still doesn't save the changes.

View 4 Replies View Related

Forms :: Save Record For Invoice Before Saving Invoice Items From Subform

Jul 30, 2013

I have a main form and subform. The main form is bound to a table of invoices and the subform to a table of invoice items. I'm picking up the invoice number from the form to save it to the invoice items table, so I need to save the record for the invoice before saving the invoice items from the subform.

View 4 Replies View Related

Forms :: Saving New Record When Moving To Another Record In Same Subform

Jan 17, 2014

I have a subform with records of call details (date, time, subject) - the date and time are autogenerated and subject is a text field. After entering text in the subject field and then clicking on the close button in the main form, or clicking anywhere else in the main form, the record is saved to the table. However, if I enter text in the subject field and then move up to view previous records (within the subform) and then click the close button in the main form the record is not saved in the table. How can I either save the record before allowing the user to move to another record within the subform or before exiting the subform set the focus to the new record so that it will be saved on exit?

View 4 Replies View Related

Queries :: Mass Duplicate Main Records And Related Subform Records

May 29, 2014

In my simple database (attached), I need to mass duplicate Tasks and their Notes.

I have three tables: tbTasks (PK: Task_ID), tbNotes (PK: Note_ID), jtbTaskNotes (FKs: Task_ID and Note_ID). jtbTaskNotes is my many-to-many junction table that ties Tasks to Notes.

The main form (fmTasks), bound to tbTasks, has a subform (sbfm_TaskNotes) that displays notes associated with each Task. On themain form,you select which Tasks you want duplicated via a checkbox. The append query (quCopyTasks) will duplicate all tasks that have the checkbox checked. All good there. However, I can't figure out how to also duplicate each task's Notes.

I found Allen Browne's solution [URL] ....., but that only handles duplication of one record at a time, whereas I need to duplicate many records at a time (sometimes 10+ records). How do I go about duplicating multiple Tasks and their associated Notes?

Before you ask "why are you duplicating records?": There are times when tasks need to be re-accomplished and therefore need to have a new record. It's easier to duplicate records than it is to hand-jam everything again.

View 5 Replies View Related

Forms :: Closing All Forms And Saving Records First

Jul 14, 2015

I have had some issues caused by users exiting the database entirely when they realise that they have entered something incorrectly; this in turn has caused problems re-opening the half finished record (the last step of the record creation is to allocate it a unique reference number, which is then used to re-open the record for editing on a point and click form) - now, this is entirely my fault for expecting users to clear up behind them or to exit properly.

So, I am making some changes - when the dashboard form opens it removes the database window close button. I have a separate close button which has the following code:

Code:
Private Sub cmdGoodbye_Click()
Do While Forms.Count > 0
DoCmd.CLOSE acForm, Forms(0).Name, acSaveNo
Loop
DoCmd.Quit
End Sub

However, I would like to add a line to automatically save any records before closing each form - is this possible?

View 7 Replies View Related

Update Subform Records

Sep 29, 2005

I am building a debt management program in A2k. I have created a tabbed control which contains 6 pages based on a set of queries. These pages are a budget template and the intention is that when this form is inserted as a subform into the customers form the budget will open as a blank template with the budget categories displayed. The clients budget will then be entered and saved. The Budget table contains 56 budget categories.

At the moment when I insert the budget form and use it the only records that change are the template. I want the first 56 records to remain with zero values so that they display as blank for a new client but I want the total 56 new records to have the customer ID associated so that when that client record is accessed again their budget will appear. I have attached the SQL code for the query that displays a sub portion of the budget.

SELECT Budget.BudgetID, Budget.ClientID, Budget.SectionNumber, Budget.BudgetTitlesID, Budget.Description, Budget.Cash, Budget.Credit, Budget.Frequency, IIf([frequency]=1,([cash]*52/12),IIf([frequency]=2,([cash]*26/12),IIf([frequency]=3,([cash]),IIf([frequency]=4,([cash]/12),0)))) AS Totalscash, IIf([frequency]=1,([credit]*52/12),IIf([frequency]=2,([credit]*26/12),IIf([frequency]=3,([credit]),IIf([frequency]=4,([credit]/12),0)))) AS Totalcredit
FROM Budget
WHERE (((Budget.ClientID)=[forms]![customers].[clientid]) AND ((Budget.BudgetTitlesID)=1)) OR (((Budget.ClientID) Is Null) AND ((Budget.BudgetTitlesID)=1));

My thought was to do an after update event that would copy the clientID from the main form to the sub form and populate all the records in the budget. However, I have only succeeded in populating the individual record that has changed.

I probably haven't explained the problem sufficiently to get some help but would appreciate any thoughts.

Thankyou

View 2 Replies View Related

Limiting Records In A Subform To 24 - How To

Nov 17, 2005

Ladies / Gents !

I am writing a database for my work environment to enter sample numbers in a predefine batch. My Form contains information to identify batch ID. Attach to this form is a subform which I would like to limit the number of records to 24.

exsample: form : as unlimited records
subform: only limited to 24 records within the master form.

Now, everytime i create a new record in the master form , I should be allowed to enter only 24 records in the associated subform.

Does anyone have an idea on how to accomplish this !! Your help would be greatly appreciated.

Thank You

View 1 Replies View Related







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