Forms :: Can't Add Data To Subform

Jun 9, 2013

I had a problem earlier with a subform (posted May 30/2013, "Subform is blank") whose database was fairly complex (for me, at least), so problems I had with the subform may have had many causes. So I decided to build a very simple test database for employees and their phone numbers. There are three tables: AllContacts, for the names, PhoneNumbers for the phone numbers, and PhoneNumberType for the type of number (office, mobile, home, etc.).

Each employee may have several phone numbers. A main form is for entering firstname and lastname, and the subform is for entering the phone number(s), and the type of number (office, mobile, home, etc.) for each one.

The problem I'm having is that the subform will not accept data in its Number Type field. The error is "The field cannot be updated because another user or process has locked the corresponding record or table. (Error 3164)." I'm the only user, and the control has no locked fields. The Phone Number field will also not accept data: "Cannot add record(s); join key of table 'PhoneNumbers' not in recordset."

I suspect my table relationships may be incorrect, but I don't see where.

View Replies


ADVERTISEMENT

Forms :: Display Data In Form As Select Record In Subform In Data Sheet View

Nov 11, 2013

i have a main form named(EMP) i have a subform named(SEMP)with EMPID i have an another form Named(SDetail) with EMPID i want to open form Sdetail with filter records for data select in subform (SEMP) ,EMPID field Subform SEMP in as datasheet view. i can open sdetail for selected records only

View 14 Replies View Related

Forms :: Data No Show In Subform

Aug 16, 2013

I am trying to do a simple Do-while loop to display master and relevant transactions in form/subform environment under Access 2003.Below are some of my statements:

Dim dbs As DAO.Database
Dim TRANS1, TRANS2 As DAO.Recordset
Set TRANS1 = CurrentDb.OpenRecordset("Master", dbOpenDynaset)
Set TRANS2 = CurrentDb.OpenRecordset("Transaction", dbOpenDynaset)

[code]....

then I ha e a main and subform creation with at least the variable "text456" to ensure the master transaction code (i.e. the transcode) has been located and are in the main form. In the subform that I have created, I have a condition as [forms]![mainform].[text456] under the "transcode" field in relevant query file. I have also checked that in the property of subform, both the child and parent linkages are stored the "transcode" variable.

But when I run the program, it only show the "transcode" in main form but no data showing in the subform.

View 7 Replies View Related

Forms :: Subform Not Showing Data

May 27, 2015

I have two forms. The first form has individual data to include the person's Social Security Number (SSN). I have another form (subform) that has other data to include the person's SSN. I added the subform to the form (linked the SSN). Unfortunately, only the SSN field appears in the subform. None of the other data in the subform appears in the subform.

View 6 Replies View Related

Forms :: Filter Data In A Subform

Jun 14, 2013

I have a subform in a form that displays all members of staffs Name and employee no. I am trying to find a way to search the subform on the main form it's on using textboxes to filter data, here is the code I have that searches the employee no.

Code:
Private Sub Command178_Click()
Dim dbs As Database
Dim qdf As QueryDef
Dim sqlstr As String
Dim sqlstrwhat As String
Set dbs = CurrentDb

[code]....

I do not get any errors and I haver used the same code structure for other subform filters but when I search for an existing employee no. the subform only displays a blank record with the employee no. 1?

View 5 Replies View Related

Forms :: Subform Disappears If There Is No Data

Jun 24, 2013

I am using Access 2010.

Whenever I come to a record that does not have any data in my subforms, then (as you can expect) my subform controls disappear.

My subforms have "Allow Additions" set to YES.

The subform tables are linked through a LEFT JOIN.

I would like the controls to stay visible even when there are no records in the subforms.

I tried to set the subforms ID to the main forms ID thinking that this will at least generate an autonumber to make the subforms controls visible, but it did not work

=[Forms]![frmCandidateInfo]![CandidateID].[Value]

View 2 Replies View Related

Forms :: Refresh Data In Subform?

Aug 15, 2014

I looking for a simple trick to refresh the data in a subform in vba code?

View 3 Replies View Related

Forms :: Subform Not Showing Data?

Dec 5, 2013

I have a Subform that is inside a Subform that its only purpose is to display some calculations but for some reason it is blank. Here is a screenshot of what I am dealing with:

See that area under "Pump Calc" that is blank...it should have data in it:

Here is the query that drives that data:

And here is a copy of that subform running in form view:

What am I missing?

View 6 Replies View Related

Forms :: Adding Data To A Subform

May 7, 2015

I suppose a field could be added to tblProspectSkill, and the command button code could include that field in the SQL, but I keep thinking there should be a better way than copying the values. However, my attempts to link have led either to multiplying the record count by 9 or a recordset that cannot be edited.

the idea is that a position in football will be assigned nine key skills that are important to the team that is thinking about acquiring that player. For a position (quarterback, for instance) there will be a master list of nine skills, along with an importance rating (1, 3, or 5, which is essentially high, medium, or low) for each skill.

Then the prospect (the player being considered) is assigned a position such as quarterback. A command button creates nine records in a Prospect Skills table that is related to the Prospect table. The nine records that are added are the nine skills described in the previous paragraph. Each skill in this listing is assigned a grade, which has a numerical value as well as a letter grade. The numerical value is then multiplied by the skills importance rating (1, 3, 5) and the results are then averaged for a final value.The difficulty I described in the first paragraph is that when I try to link to the importance rating I end up with 81 records (9 skills * 9, apparently), but I can't sort out how to change that in a writable query.

View 10 Replies View Related

Forms :: Data Moving Around On Subform

May 8, 2015

I have a form on my database called frmFloorRun in which a user inputs a line number on the main form, and then in the subform they enter what will be running on that line for that given day.

Everything seems to work beautifully except that when a user clicks on a line other than line 1 and clicks the refresh button, the first item scheduled to run on line 1 will move to whatever line the user is currently on.

To replicate this issue: simply open the database (i have slimmed it down so that only the floor run portion is included).

Open the form [frmFloorRun] observe the first line item on line 1 (that should be what the form opens to by default).

Now click on any other line by selecting it from the dropdown (yes I realize it is a combo box, but even when I remove that combo box and enter a line number manually, the issue persists).

After selecting another line, click refresh and that first line item from line 1 will move to whatever line you have selected. This is a huge issue for our company.

Also, I have included the report that is based on this form. It simply proves that the line item does not just move on the form - it moves in the report too.

View 2 Replies View Related

Forms :: Enter Data To Subform With Autopopulate

Jun 24, 2015

I know the way to SELECTDISTECT on a combobox referring to a table so the value will autopopulate in the combobox. But is that doable in a subform?

I have a table with 3 columns. First Name, Last Name, Relationship.

I want to let the user adding data directly to the subform, but when typing RICHARD in the first record of First Name, then on the second record, when they type R, it will suggest RICHARD, a kinda auto fill if desire.

View 11 Replies View Related

Forms :: Populate Data From Table To Subform

Nov 29, 2013

I want to append/populate all data from one table to subform?

It is possible?

I managed to populate data from one table to another but my relations between form and subform isn't good, because record that is supposed to be filled as the "link master fields" is left blank.

View 3 Replies View Related

Forms :: Pre-populating A Subform With Parent Data

Jun 2, 2015

I have a parent and sub form in dataset view.

What I would like to do is prepopulate the subform with data from the parent form when I create a new item of data..

i.e.
When I click the "+" button Field1 on my subform is populated by Field1 on the parent.

I have tried beforeupdate on both the subform properties and the subform.Field1 properties.

View 3 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

Forms :: Drop Down To Populate Data To Subform

Dec 15, 2013

I have:

Tables: Customer and Orders

Relationship: Customer ID is the primary key in Customer and is a foreign key in order table.

I need to create a Form with contains all the customer info from the customer table, as a drop down list. Once the customer is selected, all their orders should appear in a subform. At the minute I can get a form to work which shows all the orders but you have to go to the next record so see the order. For example it will say John smith and one order. The next record will be John smith again and their second order in the sub from.

I have used access in the past and I am fine with creating everything apart from the drop down. I am just a bit lost with the structure.

View 2 Replies View Related

Forms :: Subform Not Displaying Data For Certain Records

Jan 22, 2015

I have a main form which displays data regarding stock takes for a number of locations. The form is bound to a query which is based on a table containing a STOCKTAKE_ID field which is an autonumber field. The STOCKTAKE_ID is present on the main form

I then have a subform which is linked to the mainform via STOCKTAKE_ID.

When I open the form for a particular location the subform displays data, no problem. When I do the same for other locations the form is blank. If I check the table that the subform is based on, there is a record with correct STOCKTAKE_ID but for some reason the form won't display it. There are also no duplicates.

View 2 Replies View Related

Forms :: Insert New Data And Show All Records In Subform

Mar 27, 2013

I have a form with a subform. I want to use the main form to insert new data and the subform to show all records that are there. One could say that the after inserting a new record with the fields in the form and save it, it should appear in the subform datasheet view.

Please see attached the sample database..

View 3 Replies View Related

Forms :: Subform Data To Copy Itself Into Main Form

Oct 23, 2013

I have an unbound subform within a main form that i add data to.

Once I click save to save all the data the subform data will save itself into tblPerson and the main form data will save itself in tblSupplier.

The tblPerson will have an autonumber for the whole record, i need this autonumber to save in tblSupplier, only this autonumber.

View 5 Replies View Related

Forms :: Sync Subform Data With Main Form

Feb 17, 2015

I have tblEmployees for employee info

tblEmployeeAbsences for employee absences
tblVacation for employee vacation info

While entering the employees hours I want an adjacent subform to show the matching employees absence and vacation days taken if any.My approach was to use a Cartesian qry for the record source for the subform and link it with a fake key from the main form.

View 3 Replies View Related

Forms :: Sourcing Data From Subform Selected Record

Apr 24, 2013

I have a main form (frmMain) and a sub form (frmChild), set as datasheet. The first field in the datasheet is set as a hyperlink and opens another form correctly. What I would like is if the user selects a record on frmChild, then a textbox on frmMain is populated by the corresponding value in the second column of the datasheet. Is it possible to do this via vba, and if so, how? I've read about solutions by using continous forms, but I'd like to stay with datasheet format if possible.

View 2 Replies View Related

Forms :: Save Calculated Subform Data To Table

Oct 20, 2014

What I'm trying to do: I have created an unbound field within a subform's footer to calculate the average of the displayed record values. The subform is in datasheet view. The records are returned based on a query with a relationship between two tables. I need the calculated data (which I currently have displayed on the main form) to populate within the master table.

I can't figure out how to automatically do this. I created a simple command to get it there, but I'd like the user not to need a button to display a calculation.

Main form based on TableA; subform based on TableB.

Here's how I have it set up (Btw, I suck at SQL I just figure this is easiest to read):

Query SQL looks like this: SELECT tblB.Field1, tblB.Field2 FROM tblB.Field1 INNER JOIN tblA ON tblB.Field1 = tblA.Field1

Main form: unbound txtbox = [Forms]![frmA]![subfrmA].Form.[txtAvg]

The field that is averaged is tblB.Field2. There are potentially a bunch of records displayed in the subform.

I need that [txtAvg] field to save to TableA. My command button is simply Me.tblA.FieldName = Me.unboundtxtbox. I'd like to do away with that.

I tried to use the on current or on load event for the main form; but the calculated field value is 0 until it calculates it. It seems like there is a short delay before the value shows up on the form at which point the on current or on load events don't pick up the calculated value; just the 0 that is initially there.

View 5 Replies View Related

Forms :: Copy Field Data From Form To Subform

Jan 9, 2014

I have a form puling from one table and then a subform in that form pulling from another table.I have a field in the [FORM] called [GROSS REFUND] and a field in the [SUBFORM] also called [GROSS REFUND].I want the value of [FORM].[GROSS REFUND], if the value is not zero, to be copied into a new record on the [SUBFORM.[GROSS REFUND].

View 3 Replies View Related

Forms :: Main Form Duplicated When Data Entered In Subform?

Aug 6, 2014

I have a main form titled "projects" with a subform titled "inventory". They are linked by two fields "project" and "fiscal year" with a one to many relationship. These fields are also the primary keys in the main form. I also have the referential integrity option activated.

Whenever data is entered in the subform inventory, it duplicates the main form and all the other subforms linked to the main form. (I have about 11 other subforms linked to the main form). So if I enter 2 records in the inventory tab, there will be 2 records for the same project and fiscal year in the subform and all the other linked subforms with the same data, so it is almost like it is seeing the inventory subform as the main form. I have tried deleting the duplicate record from the main form, then it deletes the 2nd entry of the subform. I have attached a pdf with a print screen of the 2 duplicate records with the same fiscal year and project name.

I have another form called Notes that has a similar relationship, but doesn't have this problem. I think it might have something to do with the conversion. I originally created the database with Access 97 and we are now using Access 2007. Am I missing something that needs to be done in Access 2007 to link the 2 forms, so I can enter records in the subform without duplications?

Also, the database is split so there is a back end and front end. I have all the tables and relationships set in the back end.

View 5 Replies View Related

Forms :: Can't Edit Or Add Any Data In The Subform Results With Previous Setting

Mar 28, 2015

i've got a Form that contains Subform with an embedded Query that contains 2 tables only (Payments & Invoices) the Join properties between them show all records from payments and what matches it from Invoices where the joined fields are equal (Invoice no).. So, when i enter certain data in the main form the Subform show the results for it from Payments table and only one field needed from the Invoices table !!

The problem is.. i can't edit or add any data in the Subform results with the previous setting, but when i completely remove the Invoices table from the embedded Query then swift to the Form and it's Subform.. i become able to edit and add data in the Subform easily... !!

So, how to enable the edit/add in the Subform with the 2 tables in the embedded Query ?! Cause it's really needed to show that field from the Invoices table.

View 3 Replies View Related

Forms :: Based On Main Form ID Subform Data Should Be Shown

Mar 19, 2013

I have form where I will show the details of one table(member details table). In same form I have subform where I can get the member family details (here I am using the relationship table), now my problem is when Member detail form open based on the member id, the below subform data should be fetched...

View 6 Replies View Related

Forms :: Deleting Subform Data When Main Form Is Deleted

Dec 9, 2014

I have a main form with several linked by ID worksheet sub-forms. I would like to add a on-click function to delete the main form and all related record on each sub-form. I have tried several methods but nothing is working correctly. The cascading delete function is not available as part of the form relationships. How I can accomplish this?

View 1 Replies View Related







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