Forms :: Information Not Retained Within Subform When Creating A New Record?

Jan 20, 2014

I have a form and a subform.

When I click on the command button to create a New Record and then type the customer details in the Main Form and the Order Details in the Subform, the information is not retained

i.e. when I close the Form and then re-open the Form the orders details are not saved but the customer details are.

When I re-enter the order details the information is retained this time, everything seems work ok second time round!!

View Replies


ADVERTISEMENT

Forms :: How To Transfer Information From Current Record Into A Subform

May 8, 2013

I have a form which contains a subform. On this subform, the user will enter several lines of container ID numbers. If one of these containers has errors, they check a yes/no box and a pop up form opens for them to enter the details of the errors.

I want two fields that are populated on the subform to transfer information to the corresponding two fields on the pop up form. This works when only one container ID has been added to the subform. However, when there are multiple containers in the subform and the container with the errors happens to be the second or third record on the subform, the pop up form always transfers the information from the first record to those fields.

I also have the subform requerying when the check box is checked so that the information saves to the table and the focus does stay on the correct record but the pop up form still opens with the wrong information.

how to transfer the information from the record that the user is currently on?

View 4 Replies View Related

Forms :: Access 2010 - Creating A New Record In A Subform?

Apr 12, 2014

I am trying to create a database to manage IT assets, most of the structure is done, I'm now trying to get the details done.

The issue I am currently trying to tackle is to get a control button on one form to create a new record in the sub form that sits in the main form via another pop-up form.

So I have :

>PeripheralsViewForm - that has 4 control buttons (Edit Quantity, Edit Description,Add an Item and Exit)

>> PeripheralsSubForm - (Datasheet) which is referenced to PeripheralsQuery

The Edit Quantity and Edit Description open a separate form which allows the user to update only the quantity or description respectively (I have done it this way rather than allowing edits in the data sheet as I feel that it is too easy to hit a key incorrectly and overwrite data in the datasheet view) Both of these functions work perfectly (to my amazement) - I am using the id field in the subform to link to the pop-up form which then has unbound text input boxes, which I then write back to the subform.

e.g from edit button on click event: DoCmd.OpenForm "perquantform", , , " ID=" & Form.PeripheralsSubForm!ID and then from the pop-up form "perquantform" on the "Exit & Save" button I have :

Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquant DoCmd.Close acForm, "perquantform", acSaveYes

This allows the user to select the record in the datasheet form and then click either the change quantity or description button.Also also the other reason I did it this way was because I just couldn't get the subform to requery when I had the two edit popups linked to the table or query.

The problem now is that when I click on the "Add an Item" button, it overwrites whatever record is currently selected !

The code I have is this:

From the "Add an Item" button on click action:
DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec
DoCmd.OpenForm "addperform"

And from the form "addperform" - "Save & Exit" button on click action:

Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerType = Me.pertypedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerMake = Me.permakedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerModel = Me.newmodel
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerDescription = Me.newdescription
Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquantity
DoCmd.OpenForm "PeripheralsViewForm"
DoCmd.Close acForm, "addperform"
--------------------------------------

the line "DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec" is what I have added to try to solve the overwrite issue, but when I run this it comes up with the error :

"runtime error 2498 - An expression you entered is the wrong data type for one of the arguments"

I have put this line in the "addperform" exit action and it comes up with the same sort of error.

Using Access 2010.

View 14 Replies View Related

Creating A New Record From Existing Information

Mar 28, 2006

Hi there,

I have a form with information on it relating to several linked tables. I would like this information to be duplicated in the tables and a new autonumber assigned.

Is there a way that I can do this by clicking one button and the autonumber will automatically generate a new number keeping the rest of the information in the form and updating the tables with a new record?.

Thanks for you help
Belinda

View 2 Replies View Related

Forms :: Creating Record From Subform - Use One Of Values In Main Form

Apr 5, 2013

I'm trying to create a record for a table that has 2 attributes:

ContainsTracks
+album
+tracks

I have my main form, where the album is determined by a TextBox. My subform has a textbox that lists the tracks (in datasheet view). I have this set up and working fine.At the moment if I try to add a new record by typing a new entry into the subform I get the error: "Index or primary key can not contain a null value". This is because both album and tracks make the composite primary key of ContainsTracks.

My question is, how can I tell the subform to grab the value from TextBox1 in the main form as the +album when I create a new record.I have provided two screenshot that perhaps explain my predicament a bit better

View 2 Replies View Related

Forms :: Creating New Record In Subform - Button To Add New Object To Main Job

Jul 1, 2013

What i'm trying to do is add a new record to a subform. The problem is, I couldn't use a subform based on a table in order to achieve this. I needed extended information for it to be useful, so I made the visible part of the subform based on a query instead.I'd like to add a button that adds a new object to the main job. I'd like the adding of that button to call a new form allows you to fill in the information for that object (this called form actually contains 5 subforms to populate all the data of the object). That form works.

What I need is for the button to call the 2nd detailed form AND create the necessary entries in the project/object junction table.The idea as it is now is a button on the main form, but if it was possible to do so via continuous form in a subform, that's doable.

View 11 Replies View Related

Queries :: Creating Employee Database To Record Related Information?

May 9, 2013

i have been trying to create an employee database to record:

1. Name , Address
2. Telephone
3. Date of birth
4. employee ID#
5. Emergency contact -name, address, telephone
6. Photograph
7. Other pertinent information related to employees

So far I have incorporated the contacts database forms into my new database but I am unable to link the forms into one form that will incorporate all the information needed. Is there an existing employee database that I may edit to suit my purposes?

View 2 Replies View Related

Forms :: Subforms And Many To Many Relationships - Data Not Retained

Jun 4, 2013

I have created a form with two subforms. The context of this is a litigation database. The main form is for testimony. Among other things, it includes a field for a question and an answer. Any given piece of testimony may relate to one or more documents, and any document may be referenced in one or more pieces of testimony. So have two subforms, one for documents produced by the Plaintiff, and one for documents produced by the Defendant. It worked out easier that way because I originally created indices of those documents in separate Excel tables which I then imported to Access.

So the relationship for both document tables relative to the testimony table is many to many, which is established using two junction tables.

I also have a combo box in each subform where I can autofill fields based on selection of the document number.

My problem is that while the combo-box works great, once I select a document in the subform, that selection is carried over into the next entry of the master form, but also the selection is not retained in any of the master forms. So I can browse the document listing from any entry in the master form, but I can't get the document selection in the subform to stick and create a lasting relationship to a given record in the master form.

Is my problem that it is just impossible to have a subform based on a many to many relationship, or is it in the parent child relationship of the form and subform, or is it in the properties of the subform?

View 13 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 To Show Latest Information

Sep 14, 2014

I created a vehicle database that includes a sevice subform to track service history. The main form is bound to the vehicle table that tracks the vehicles we have. (Vehicle_ID). The service history has its own table that stores its history and is link to the vehicles table. I created a report that shows my vehicle and its last history item. When i click on it, it will bring up the vehicle form where you can add information. Is there a way to create the form, so when i enter the latest information and i click on it, it will bring up my main form, and in my subform svc history, display the lastest information.

View 1 Replies View Related

Forms :: Subform Is Not Refreshing / Updating New Information From A Combobox

Jul 17, 2013

I have a mainform in access with a subform (continous form mode). The subform's source is a query that has a criteria parameter that gets the values from a combobox in mainform.(list of projects) Combobox name= cmbProject

It works fine for some records (old records), so when I migrate new data into the table the comboxbox display the new data but when I select the record to be dispayed on the subform, the record or data is not in the subform, so the record is in blank.

View 1 Replies View Related

Forms :: Way To Display / Hide Information On Subform Using Check Box?

Jul 11, 2013

Is there a way to display/hide the information on a subform using a checkbox?So, when the checkbox is checked, the fields are blank but when the checkbox is unchecked, the information displays?

View 5 Replies View Related

Creating New Record In Main Form From Subform

Aug 4, 2005

Hi,

I want a user to be able to create a new record in the main form, after they have finished filling in the boxes in a subform by pressing the Enter key, rather than having to click the 'new record' button on the main form.

I reckon I need a 'default button' on the subform but I have no idea what this should do when clicked to create the new record...

View 1 Replies View Related

Disable Subform When Creating Record In Parent

Jul 27, 2004

I'm having difficulty controlling data entry to (disabling) a subform when a new record is being added to the parent form. I can set the subform to be disabled if there is no index value in the parent form (this allows the subform to function for existing records) but then the user has to create the parent record and move off of that record and then return to it in order to add child records to the subform. This is basically a create new records/data entry problem and I'm feeling pretty stupid. There must be a way to handle this...

View 3 Replies View Related

Modules & VBA :: Creating New Record Within Subform - Cannot Navigate To Other Active Records

May 4, 2015

I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records.

Code:
Private Sub cmdNewProject_Click()
'set focus to sbfProject
sbfProject.SetFocus
'navigate to new record
DoCmd.GoToRecord , "", acNewRec
End Sub

View 2 Replies View Related

Forms :: Highlight Unbound Subform Record That Matches Other Subform Record

Jan 22, 2014

I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:

Code:
Private Sub Accounting_Unit_Enter()
'find where AUs match. only works for first Subform2 record
If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then
msgbox "Match"
End If
End Sub

My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,

View 6 Replies View Related

Forms :: Prevent Record Entry With Information Missing

Feb 18, 2014

I have a form and was wondering if it was possible to set it so that a user is not able to click the submit [Submitcmd] unless certain text boxes are filled (however SampleOuttxt needs to be able to remain blank).

View 5 Replies View Related

Retained Value

Jun 22, 2006

Hello! I am new to your board!

Can someone please tell me how to keep the value typed in a field (Text field and Combo Box) on a Access Form the same until changed (always retaining the value of the last typed value until changed)?

Thank You!

View 8 Replies View Related

General :: Record Lesson Information - Multi Student Forms And Reports

May 16, 2015

I created a database to record lesson information (see attached sample). When there was only one student per record, everything worked fantastic.

However, management would like to have one record per lesson, which means that up to eight students would need to be accounted for.

Adding additional Student_IDs to the lesson record table and the associated links to the student table was simple. Inputting lesson information was pretty straightforward.

The problem arises with output. There is one report to review an individual student's past lessons. Also, there is a form in which to export the lesson's public comment.

Both use different queries, but with the same name as the form and report.
Both the report and exported Excel file are blank, no data.

I'm building this in A2010, but saved as A2003 (working environment).

View 5 Replies View Related

Forms :: Creating Subform Using Single Table?

Feb 12, 2014

Is it possable to create a sub form using a single table. I can create one using 2 tables but am not sure on how to or if it can be done using 1 table. All i can find in forum is about multiple tables.

View 2 Replies View Related

Forms :: Underlying Query In Subform Creating Duplicate Records On Form

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

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Forms :: Stop TAB Creating New Record?

Sep 16, 2014

But I use one for creating new records in a table.

And one to View/Edit exiting records.

When I open an existing records, and tab through the fields. Once I pass the last field it creates a new record.

View 2 Replies View Related

Creating Simple Invoices But Maintaining Information

May 19, 2012

I need to create buyer and seller invoices within my access 2003 databases, my sister in law runs an antiques auction house and I'm working on a database to capture all their information.

I've created a 2 queries (a buyer invoice and seller invoice), show all unsettled items with the relevant item information and fee's.

However, I would like it to automatically allocate an invoice number, and store the information back to a table (seller and buyer ID, total number of items on the invoice, total fee etc)

I'd like store the invoices as well, so within the customer record form, I can include a box showing a list of the buyer invoices on one side and seller invoices in another (not all customers are buyers and sellers).

Once I've issued an invoice, can I automate it to show that item as then as invoiced?

Can the invoices be editable at all?

When they come in and settle their account, I also need to feed this information back in as well.

Can i arrange an invoice for seller's particularly, to show all sold items, and the fee's associated with them

Returned items as well as any associated fee's with them?

I have been looking at the Northwind example.

I see how they have an orders details table and orders table, I could replicate this.

I could have an Buyers Invoice table and Buyers Invoice Details table, but how do I generate an invoice, pull the next Invoice number from my (currently blank) invoice table, and pull in the outstanding items for that buyer for that specific auction date (I have a query), and then populate back information from the invoice?

I like the fact that their order form is editable, do any changes go back to the query, that then populate the invoice when you click print invoice?

I need to be able to (at the end of the auction) pull all items from my item log, for that buyer, and print them an invoice, automatically saving all the invoice details back into my database.

I need be able to automatically flag the items in my items table, as invoiced and pull the invoice number in?

I can see how all the Northwind tables, queries, and forms relate to each other and subforms, but I'm not sure how to actually create an invoice, get invoice number, merge with my query, and then feedback in.

View 1 Replies View Related

Forms :: Requery 2nd Subform When Different Record Highlighted On First Subform

Sep 3, 2013

I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.

These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?

View 10 Replies View Related

Linking Forms (and Automatically Creating New Record)

Apr 26, 2006

Please forgive me if I don't explain everything properly, I am relatively new to Access.

I have two tables with the following information:

VOLUNTEER
PK: volunteer_ID (autonumber)
name, address, school, etc

SCHOLARSHIP
PK: scholarship_ID (autonumber)
description (text)
amount (currency)
FK: volunteer_ID (number)

One scholarship can be awarded to only one volunteer.
I have a form to enter all the volunteer information. At the bottom of the form, I would like to place a button to open a new form to award a scholarship to this volunteer. I believe I need to link the forms in the following manner:

VOLUNTEER.volunteer_ID = SCHOLARSHIP.volunteer_ID

The problem is this: The forms are not linked properly because in order to assign a volunteer to a scholarship, the scholarship must already exist. So when I click the button to open the scholarship form, the scholarship form is empty and the volunteer_ID defaults to "0".

I think this could be fixed by somehow making my button create a new scholarship_ID in the scholarship form and THEN linking the volunteer_ID fields.

Does this seem like a solution? If so, how would I implement it? I have a screenshot to help. Thank you in advance for your help.

View 6 Replies View Related







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