Subform Not Displaying Correct Records From Main Form

Feb 23, 2005

Hello. The problem I am having is related to two tables. I have a table called Void and a table called Panel. A panel can have multiple voids and a void is assigned to only panel (one-to-many). In the Panel table, I set an autoincrementing number(SprayPanelId) for the pK. In the Void table, I set an autoincrementing number (VoidId) for the pk. I place the SprayPanelId into the Void table as a foreign key (same name in the void table). The problem I have is in my forms. I created a Panel form with a button to open a subform for data entry on the voids related to the panel in a new window. Data can be entered and is properly saved in the Void table. I open the Void table in a datasheet view under the table section and see it is properly there. I can run queries where Void.SprayPanelId = Panel.SprayPanelId and it returns the correct void with the correct Panel. The problem becomes when I open my void subform, it no longer displays that record associated with that panel. however, the record is there in my void table. Any thoughts? Do I need a filter perhaps, run any sql commands? Thanks in advance, Kevin

View Replies


ADVERTISEMENT

Subform Correct Answer Adds To Number Correct In Main Form

Mar 2, 2012

The code I have is.

Code:
Private Sub Command26_Click()
If Forms![test site]![prp test].Form.[A Right Answer] = -1 Then
Forms![test site]![number correct] = Forms![test site]![number correct] + 1
End If
DoCmd.FindNext
End Sub

Then when clicked it checks a yes/no box to see if "A right Answer" is the correct yes. Then it should pop to the main form and take the number correct cell and add one to it. I am trying to get the record to go to the next record inside the sub-form but docmd.findnext seems to be wrong too.

View 4 Replies View Related

Subform Records Not Tied To Main Form

Dec 19, 2006

OK.... This is a DB I've been playing with a while... Got a few things fixed and working.... But of course more problems came up. This is a DB for tracking time spent on a project. This was all it was at first... Then I decided to add invoicing and got into trouble :) I have one main problem now and can't decide the best way to fix it.... Other then starting again and redesigning the DB.
I attached a copy... Easier to see the problem that way. From the main menu, click on "Open Client Billing"......From there, select a record on the subform and click "View Unbilled Time" From this form you will check a box to "Export" that time to create the invoice. And here is the problem. For example, if you click one out of two records to export it shows your record and creates the invoice. BUT... then if you close out and open it again to add the other record creating another invoice the previous record is ALSO in the new invoice!
So.... The records in the subform are not getting tied to the invoice number. Anyone want to make some suggestions on how the best way to correct my problem would be?

Thanks

View 1 Replies View Related

Subform Not Gathering All Records From Main Form

Mar 5, 2015

I am having issues with my subform loading all records from the main table that its linked with. My main table has 8,849 records that fall Group 1 but only 8,831 records are showing up in my subform. I need to figure out how I can fix this. By a SQL code or VB code.

View 1 Replies View Related

Clear All The Records In The Subform Of The Record In The Main Form

Jul 19, 2005

Hello,

I am trying to create a command button that clears all the records in the Sub form in the CURRENT RECORD OF THE MAIN FORM.
I know this sounds a little bit confusing, but I hope you understand!

The main form is: frmOrder2
The subform is: subfrmItemOrder

The fields in the subfrm that has to be cleared are:

Items (combobox)
UnitID (combobox)
K1 (txtbox)
K2 (txtbox)
K3 (txtbox)
CSB (txtbox)
DTSS (txtbox)
H (txtbox)
Remarks (txtbox)


The two forms are linked by the field OrderID.

Please help me!!
Thanks!
jenny

View 14 Replies View Related

Subform Display Is Not Showing Appropriate Main Form Records

Jan 23, 2012

I have search filter form that when I click the search button is passing a value in OpenArgs to the Main Form on open event. The OpenArgs is changing the recordsource of the subform on the main form appropriately. However, the main form is referencing all of the records, not just the ones that are int eh subform recordsource. My link master and child fields are correct. There is a 1:N relationship between my mainform table and subform table.

For example, my my subform, the recordsource is diplaying 2 records where the Status = BLUE, however, the mainform (Projects) is showing ALL records even where the status isn't blue. So when I scroll through the mainform records, if the project isn't status = blue, the status subform shows a blank record. I only want the Projects where the status is blue.

View 14 Replies View Related

Forms :: Display Subform Records On Main Form As Text

Jun 28, 2014

I have a form with a subform in it. The Subform relates to a junction table.

For each record on the main form, there may be more than one record on the subform. The Subform only has one field on it (a combobox).

What I want to be able to do is have a text box on the main form that shows a concatenated list of all of the records on the subform.

For example, if I have 2 subform records, 'Yellow' and 'Blue', I want a textbox on the main form record to show 'Yellow, Blue'.

I have tried so many things I have found online (over about 5 hours, including a module called ConcatRelated) and absolutely nothing works!

View 5 Replies View Related

Forms :: Check All Records In A Subform Based On CBO Of Main Form

Jun 28, 2015

I have a form with 22 subforms (in about 11 tabs). Each one of these subforms has a controlling field in the main form (table) that dictates if the associated subform needs to comply with data entry rules or not.

For example:
Field in main form cboMed (Yes; No)
Subform: frmSubMeds has a list of medications

I want to be able to loop through all the records of the subform and determine if they are complete.

This check is run from a command button; that should also consider the value in the combo box. i.e. Check only if the combo has a value of "Yes"

Since i have 22 subforms and have to run the check on everyone of them, i have used the tag property to check if the record is blank or not. This is what i have so far

Code:
For Each ctl In Me.Controls
Select Case ctl.Properties("ControlType")
Case acSubform ' only look for subforms
If ctl.Enabled Then
If Not (IsNull(ctl.Properties("SourceObject"))) Then 'if it is a subform type

[Code] ....

The problem with this is that it only looks for the selected record in the subform and doesnt look for ALL the records.

View 5 Replies View Related

Forms :: Adding Multiple Records To A Table Using Main Form And Not A Subform

Sep 12, 2013

I have an existing Main form that has a sub form that the user uses to enter multiple records into a table....it works fine EXCEPT that I need to make it even easier and more intuitive and add a lot of labels. Basically the user selects items from a drop down list that adds items to a Work Order. I need to add some labels to the form to make it more descriptive for the user.

So, what I want to add multiple records using a single main form.

Is is possible to?:

1. simply turn the subform into a single main form? Can this be done by using a Command button or something similar?

2. copy all of the controls etc from the sub form into a new main form and have it all work nicely?

View 2 Replies View Related

MsgBox Closing Main Form Then The Correct Form?

Aug 25, 2005

Hi all,

I've added a message box to what is basically a standard simple to use access control, "closeForm", I'm a newbie working on learning access vb. I'm guessing my code if fudged. Any help is greatly appreciated.

Private Sub Close_Click()
On Error GoTo Err_Close_Click
Dim Answer As Integer
Answer = MsgBox("Press Ok to Close, Cancel to Continue.", vbOKCancel + vbQuestion, "Exit Data Entry?")
If vbOK Then DoCmd.Close

Exit_Close_Click:
Exit Sub

Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click

End Sub


Thanks to all in advance

View 5 Replies View Related

Forms :: When Subform Have No Records Then Total Field On Main Form Shows Error

Sep 1, 2013

In my database main form with subform. subform have query as recordsource.total of one of field in subform shown on main form. all is ok and show total correctly but when subform have no records then total field on main form shows #error. How to convert this value either into null string or zero(0).

View 2 Replies View Related

Tables :: Subform Not Showing Correct Records

Jul 26, 2013

Table Info:

EmpProfile: EmpID (Primery Key), EmpFirstName, EmpLastName, Emptitle, EmpPhoneNumber

EmpTimes: EmpID (1 to Many relationship with EmpID primery key), Timein, Break, TimeOut, Totalhours

Query Name:

Selects the table from EmpTimes
Calculates the total hours worked for an empid, on a given day. It produces the total hours as "CalcTime"

Form Info:

1st Form Name: MainForm
Text name to enter empID : Txtempid (unbound)
Record Source: EmpProfile

2nd form name: SFTimeSheet
This is a subform within main form
Record Source: QryTime
Child and master fields are linked using : EmpID

Expecting Result:

When enter empid on the MainForm, in txtempid
subform should retrieve all entries for that empid

Getting result:

regardless what empid entered in txtempid, subform shows only the 1st record available in EmpTimes.

View 3 Replies View Related

Forms :: Make Certain User Enter Records On Subform Before Attempting To Save Main Form

Dec 4, 2014

How can I make certain my user enters records on a subform before attempting to save the main form? Right now they can completely ignore the subform before saving the record.The Main form has business address, etc. on it. the subform is bound to a join table that lists the multiple categories, subcategories and sector the business is listed in for a directory.

I already have my fields set to required at the table level in the join table, and have some existing VBA in both my subform (to update edited date) and my form (to validate empty records where a certain condition is met) but that's not the issue...

How do I focus the user to enter a record on the subform to the point where they are forced to enter something and complete the subform before the record is updated.

View 2 Replies View Related

Sort Subform Records On Numeric Values Stored In A Text Field On Main Form

Sep 25, 2015

I have developed a database but have had difficulty with sorting data within subform of a main form. The subform displays the related tasks that correspond with main form that has been selected. Within the main form I have also created a text field that defines a particular sorting sequence of the tasks found within the subform which is titled Task Sequence. What I would like to do, is use the Task Sequence field to sort the order of tasks within subform. I have tried: IIf([ID] Is Null, 0, Val([Task Sequence])) within the Advanced filter/sort but either it shows only the first task defined in the Task Sequence or it wants to filter the main form and not the subform.

View 14 Replies View Related

Why Is Main Form Update Event Triggered When Subform Dirties Main Form?

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

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

Subform: Displaying Toptext When There Are No Records

Dec 20, 2007

Hi,

This is not a very big issue, but a very annoying one. I'm making a weekly display of tasks preformed (One subform for each day). The functionality is almost like a timesheet. You register the hours worked on spesific tasks/projects.

The problem I got now is that the textbox containing the date (In the subform) is not displayed when there is no records in the subform. The date is set by the motherform - Me.Form!frmday1.Form.VarDate = Me.day1

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

General :: Access 2010 / Combo Box Not Displaying The Correct Item?

Apr 28, 2013

Using ms access 2010, I created a table called all items contains the ID, item name, item code, item price.

Second table I created called orders, contains item1,Q1=quantity,Tot1=calculated field.

Then a form to fill the orders table with a combo box for Q1 (gets the value from a table called numbers), second combo box for item1 (gets the value item code and item price from the table all items), and a text box to calculate the total of the Q1-item1(item price) All working perfect except the combo box for item1 ends up displaying a different item code that's only if the items were at the same price, for example, I choose latte from the combo box gives me correct item price but the code is cappuccino, only happening with items with the same price.

If I set the property of the combo box Bound Column to 1, I get correct item code but calculation error, Bound Column to 2, I get correct calculations but wrong item code. how to get the combo box to display the correct item code?

View 1 Replies View Related

Requery Subform From Another Subform Both Connected To Main Form

Aug 8, 2014

I have a main form that has two subforms, subform1 and subform2, both connected to the main form. When I enter data into a field in subform1 I want subform2 to requery and update to show the calculated results from the new or changed data in subform1.

I found that if I do a refresh it works when changing the data but not when entering a new line of data in subform1. I tried some code in the after update field of on subform1, but cannot seem to get anything to work.

Me.[subform2].Form.Requery

Does not work. It errors and says it cannot recognize subform2 as a field. I have tried a field name on subform2 but I still got the same error.

View 1 Replies View Related

General :: Tabbed Form - Displaying Filtered Subform

Dec 5, 2013

I've attached a link below:

Basically, its a database for an entertainments agency, I've got a form for 'Artists' which shows the performers on the agencies books. I've tabbed the form so one screen shows the artist details and I want the second screen to show the bookings that the specific artist has.

I've linked to the 'bookings' table on the subform successfully, but I can't figure out how to filter it so it just shows the bookings that the specific artist showed has.

i.e.: I want it so that The Deltatones booking tab ONLY shows the deltatones bookings.

Here's the dropbox link : [URL] .....

View 8 Replies View Related

Get Subform's Control In The Main Form.

Feb 21, 2005

Lets say I have Form A and Subform A with the parent-child relationship established that works well. Subform A has a Text box control that is getting display when I include the subform in Form A.


Now, I decided I dont want to include subform A in the Form A. Is there a way for me to show the contents of that Text box control in Form A without attaching the subform in the main form (Form A)?

I read somewhere that to refer a control on a subform, I have to use the code - Forms!mainform!subform.form!control. But this would be in VBA. What is the equivalent of this in a Control Source in the main form?

If I have not explained myself correctly, please do let me know.

To summarize, my question is without including the subform, I want to reference the values of the subform in the mainform. (I have some design necessity for this requirement) Is there a way for this?

thanks!

View 1 Replies View Related

Returning To Main Form From Subform

Apr 25, 2005

Hi,

I've a form that has 2 subforms - which subform is used is dependant on the selection of a combo box in the main form. After much time spend trying to set this up I am happy to report that this section works fine.

My problem is that when I have completed the subform I am not able to continue tabbing through the rest of the form.

Any help would be great,

thanks
Barry

View 1 Replies View Related

Tabbing From A Subform To Main Form

Jun 29, 2005

everytime i try to tab from my subform, it creates a new record for that subform. Also, about the subform, the control that links the main form and sub form is unique.
I have now set my Cycle property on my subforms and forms to Current Record. How can I tab from the subform to the main form and vice versa?

Thanks!

View 1 Replies View Related

Main Form Update To Subform Value

Sep 2, 2005

hi

i have a main form, which has a subform (subform1)

subform1 has a further subfrom (subform2)

in the subform2, i have a value, which on a double click, i wish the main form critical value to refresh to

thereby the main form refreshes to the value of the subform 2 value

i cannot work out the code, you may have guessed from the description of the question, i am a bit of a novice.

could anybody assist, please

View 2 Replies View Related

Main Form And Subform Issue

Oct 21, 2005

Hi, I have this main form, "frmMainPatient" and I am trying to add in another Main form "frmFim2" as a subform into frmMainPatient. I am running into some issues. Can someone take a look and tell me what I am doing wrong. Thank you,

View 2 Replies View Related







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