I Can Add Data Into Form But Not In The Subform.

May 3, 2005

Hi,
I want to add data into form frmStaff. Form frmStaff has subform sfrmStaffDetails. When i click on Add button, it will open frmStaff. I can add data into frmStaff but cannot add data into sfrmStaffDetails.
This is the code,

Private Sub cmdAdd_Click()
DoCmd.OpenForm "frmStaff", , , , acFormAdd
End Sub


Any idea?
Thanx in advance.

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

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

Subform Is Populated Based On Form Data?

Mar 22, 2006

** Additional Note: Could I possibly just have a field in my main form that pulls data from another table? Warning: bad with code**

I'm not sure I'm looking at this correctly and have tried to figure it out (For about two weeks now). I really hope someone can help with this.

I have to add a "Multiplier" to my form. I have tried this numerous ways but it's not working properly.

What I need is to have a main form with a subform only displaying the relevant field (that being if this month/year and location match up between both the subform table and the main form that is displayed, then show this value in the subform on the main form). With this multiplier displayed, another field in the main form is then multiplied by this value.

Is this the right way to do this or no? I'm open to basically anything. It's just that the 'multiplier' changes from month to month and rather then have people manually enter in the multiplier to the main form for every day of the month, I'd rather a field be automatically populated and therefore the other field automatically multiplying by this.

Is this possible??

View 1 Replies View Related

3 Comboxes On Form To Update Subform With Data?

Jun 14, 2006

I have a main form with 3 comboboxes as:
1. Status ("notstarted", "inprogress", "completed")
2. Manager ("john", "jill", "jack")
3. Prioritylevel ("high", "medium", low")

Then on this mainform is a subform with the data.
Now, i want to have it so that when

i select status ("notstarted") on my combobox, it updates/refreshes my subform with that data (afterupdate).
Then, when i select manager ("John") on the second combobox, it shows me data for that manager and where the status is "not started".
Then, when select a third criteria Prirotylevel ("high"), it shows me, the data for that are ("notstarted" and by manager "john" and that has a priortylevel of "high".


i.e. on the afterupdate event (or i can have this driven by a button) of all these 3comboboxes, it should update my subform data with my three or two or one (depending on how many criteria/comboxes options i have selected). I don't even know wehre to begin :(

I don't know how to do this even tho i know what i want. Please help me.

View 5 Replies View Related

Modules & VBA :: Pass Data From A Subform To New Form

Sep 26, 2013

I'm working on a database that will be used when maintenance needs to be performed on our test equipment. So far, I have a form set up for the associates to track when a maintenance action has been performed. The top section of the form contains basic data about the part and there is a subform that lists the actions that need to be taken on the piece of equipment. In the subform, the associate can mark whether the action is complete or not.

If the action is marked incomplete, I wanted a separate form to appear for them to track why an action cannot be performed. If possible, I would like this separate form to automatically show the equipment ID and the action that was missed. However, I'm having difficulty getting the data to copy from the subform to the Exception form. Is this something that is possible to do?

View 2 Replies View Related

Populate Form And Subform With Data Based On Search ..

Mar 2, 2007

Hi,

I have a form with a subform, Both of them are based on a query.the form

displays a productid and its details ,and the subform has matching

productnames for that productid.

Now i have a search on the main form wherein the user enters ( search

for) the productid, once they click search button, the form should show

that particular prod id and details and subform loaded accordingly with

that productid matches...seems simple but how do i code this in VBA??

Basically populating the form and subform with data based on search..

i am using ODBC coonxn with backend oracle tables..

any help would be highly appreciated!

Thanks

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

Modules & VBA :: Data Filtering By Form / Subform Using Same Record Set

Feb 26, 2015

I have a form and subform where i have table data in the subform and 03 Combo box in the main form header. I need to do some filtering using combox box1 and out of that filtered records i need to do one more filtering using combobox2. then again another filtering by Combobox3. ( same way we are doing in Excel)

Subform is running on a query where i have following fields;

Vessel
Voyage,
POL
POD
MLO

by Combo box 1 i need to filter Voyage
by Combo box 2 i need to filter POL ( out of the data filtered by above )
by combo box 3 i need to filter POD ( out of the data filtered by both above )

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

Prevent Subform From Updating If Main Form Data Is Invalid

Nov 4, 2005

Hi,
Mainform and Subform are linked on field "barcode".

Barcode is the primary key for the table that Mainform is based on.

When user is entering a new record, I have the BeforeUpdate event of Mainform.barcode set to check to see if the barcode already exists in the table, and if so, to give the user some meaningful error message.

Works fine, except that the subform still updates to match the invalid, previously-used barcode. I want the subform to stay blank until the user has entered valid data in MainForm.

How do I accomplish this?

Thanks for any ideas.

View 11 Replies View Related

Copy Field Data From Main Form To A Subform On Add New Record

Feb 25, 2006

I have a main form that has some sub forms on it linked by master child on PK. When I select a new record on the sub forms I want to take a date value from the main form and populate the value into a field in the sub form. How do I do this as I cannot see a new record event on the sub form?

help would be much appreciated.
regards

Peter

View 7 Replies View Related

Display Data On Subform Based On Comboboxes In Main Form?

Jun 25, 2006

Hello, I'm trying to use information based on items selected in a combobox in the main form. Once the user selects the desired info in the comboboxes on the main form, I want the subform to display the data that matches the search criteria in the main form. For instance, if I select a job number, I want everything that matches that job number to be displayed the subform (along with the corresponding job name, version, etc.). I also want to get more specific in a search where I could select a job number, job name, and job version from the comboboxes in the main form to where all the data that matches the search criteria in the main form will be displayed in the subform.

Attached is what I have so far. The form I'm trying to perform this in is the SearchByResults form and the subform is the qryk95 form. I'm trying to populate this using the K95-Template table. I performed a query (qryk95) to select only the fields I want to display in my subform. Any help would be much appreciated.

View 6 Replies View Related

Click To Trasfer Data In Field From A Combo Box In One Form To Another Subform

Nov 26, 2007

Hi,

I have a form build up with a subform in access 2003. Then I have an Insert button on this form which when clicked opens another form which is build up with a combo box. Now, when I select a field for example (Student_ID) from the combo box I would like to be in a position to click it once (the respective student_ID) so that the student_ID in that field is transferred to the subform of the initial form, which has a Student_ID field to store the respective student_ID in the table with the Subform.

How can I do that?

Any help will indeed be highly appreciated.

Regards

View 2 Replies View Related

Reports :: Create Report Containing Data From Main Form And Subform

Jan 12, 2015

I'm trying to create a report that contains data from a "main" form and a subform. However, I can't get the main form data to populate no matter what I try. I've been through all sorts of queries and just can't get it to work. The main form and subform are both separate tables, and there are no redundant fields.

Basically, the main form is an inventory of assets, and the subform is designed as a way to submit trouble tickets when one of those assets requires maintenance or repair.

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

Modules & VBA :: Subform Calculations Based On Parent-form Data?

Jul 17, 2013

I have a form with a subform in a navigation menu. Something like:

Navigation Form
NavigationSubform
ParentForm (header data and some unbound calculation fields)
Subform (Multiple lines tied to query)

I have some fields in the ParentForm (i.e PF1, PF2) that would effect the values on the Subform (i.e. SF1, SF2). Also, there are some user editable values on the subform that will calculate the remaining fields on the subform (still using data from parentform).

My calculations work fine for the changes made on the subform. However I need to be able to calculate all the children lines on the subform when the form loads or a change is made to certain fields on the parentform. My On_Current event only wants to recalculate the first line.

Parent Form
PF1=10
PF2=3
Subform QTY ADJ SF1 SF2
Line 1 5 .05 10.6 112.89
Line 2 8 .14 10.38 105.15
...
Line N
SF1=PF1+(PF2/QTY)
SF2=SF1*(SF1+ADJ)

So if PF1 or PF2 were changed then all the lines is subform would recalc SF1 and SF2. If changes were made to QTY or ADJ, then that line would recalc SF1 and SF2.

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

Modules & VBA :: How To Get Data From Subform To Text Boxes Of Main Form

Oct 14, 2014

I have an unbound mainform and an unbound subform(datasheet). The source of the subform is a query which is dynamic(I have many queries with diffrent columns). the subform source is change using a combo box selection. I have text boxes in my mainform..how do I get the data from subform to the text boxes of the mainform?

View 2 Replies View Related

How To Update A Field In Subform When Main Form Is Data Entry

Sep 19, 2012

I have a mainform set to data entry to add records to TABLE1. I inserted a subform that shows fields from TABLE2. I have a field in TABLE2, let's say TBL2FLD1(NUMBER). I want to add TBL1FLD2(NUMBER) from TABLE1 in the mainform to TBL2FLD1 and update said field in TABLE2.

My problem is:

(1) I get a #TYPE! error when I try to add the two fields, which I have tried many, many ways (adding them together in the Default Value; creating an unbound field to hold the calculation and then putting that field into the Default Value of TBL2FLD1; ETC), and
(2) I don't know how to get the subform to update TABLE2. It seems like the control gets stuck in the subform. Is there a way to accomplish this without coding it?

View 3 Replies View Related

Forms :: Locking Main Form Controls Causes Data In Subform To Disappear?

Dec 12, 2014

So I am creating a Complaint Tracking Database with Access 2013. In my 'complaint entry form' I have added to ability to "Open" and "Close" the complaint. While the complaint is open the user is able to enter/edit data in the complaint (new or old). When the complaint is "Closed" (done so with a button on the form that prompts the user to enter a date of their choice) the user should not be able to enter/edit data in the given complaint. In my original thinking, I placed checks on various events (on load, after update, on click) that checked to see if the current complaint had a date in the "Close date" field.

If the close date field was null then that meant that the complaint was open and the the controls would NOT be locked. If the close date field was NOT null (i.e. a date was present) then the complaint was closed and the main form fields were locked but the data was still viewable and unless they "re-opened" the complaint they could not change the data.

Now, in the complaint entry form, I have a subform that acts as a action tracker that is used by the user to keep track of the actions taken on the complaint (i.e. they requested documentation from such and such on this date..etc). My problem through all of this is upon closing the complaint and locking the main form controls, my subforms data just vanishes! At first I figured the problem might be with the linking of master and child fields, so I made sure that I left the ID in the main form unlocked when I loop through my controls during the locking process. This did not solve my problem. Code below:

Private Sub Form_Load()
Dim ctl As Control
If Not IsNull(Me.close_date) Then
Me.FormHeader.Visible = True
Me.btnClosed.Enabled = False
Me.btnOpen.Enabled = True
For Each ctl In Me.Controls

[Code] .....

View 3 Replies View Related

Forms :: Default Entry Into Subform Based On Data Entered In Main Form

Apr 23, 2014

I have a form that request the User to enter a Parcel ID number (99-9a-99-99aaa-aaa-aaaa). The sub form asks for the subdivision number, block number, and lot number. The subdivision number, block number and lot number are normally part of the Parcel ID number but sometimes they can be different. I want the sub form to fill in the Subdivision number, block number, and lot number as a default but allow the user to change the value if needed. currently the sub form will only show what is entered into the table itself if a change is made on the main form the sub form does not reflect the change.

View 3 Replies View Related

Forms :: Applying Quick Filter In Main Form Causes Data To Not Show In Subform?

Sep 3, 2013

I have a pretty simple form that includes subform. Subform's table is linked to main form's table with parent/child relation. Connecting fields are main table's ID field and corresponding field in child table. Subform is in datasheet view. This is pretty basic stuff so there should not be any problems, but every time I apply a quick filter in main form it causes data in subform become invisible. There is single row in subform, but all it's fields are empty.

View 5 Replies View Related

Forms :: How To Link Combobox Between Form And Subform To Only Show Selected Filtered Data

Apr 1, 2013

I have a suppliers table and a products table. Two forms, Stock form with combobox to list Suppliers and a sub form with combobox that lists Products.I want to select a supplier from the Stock form and then the combobox in the subform to only list products directly sold by the Supplier.Have dabbled in SQL as follows:

SELECT Products.ProductID, Products.ProductName
FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID = Products.SupplierID
WHERE ((Stocksubform.SupplierID=Stock.SupplierID))
ORDER BY Products.ProductName;

View 2 Replies View Related







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