I do not know if this is possible but I am trying to use a subform in a subform. Meaning I have a picture(picsubform) which is in a subfrom(frmPicExample) both of these are in a form(depot tracking). The goal of this little experiment is for every record of an item it will have the ability to add, delete, next, previous etc. to allow more then one picture to be linked to one record. My problem is that I am get the following error:
(Microsoft Office Access can't find the form 'FrmPicExample' referred to in a macro expression or Visual Basic Code)
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.
I currently have a couple of problems with an input form set-up.
I have a main form (frmWebSites). On this form I have a TabBar and one of the Tab pages holds a subform (frmSiteDetails). Within this subform I have a simple option group to select between 2 further subforms that are themselves subforms on frmSiteDetails (these are frmWebSites_pgeSiteDetails_Features and frmWebSites_pgeSiteDetails_Membership). I have coded the option group to make one sub-subform visible and the other invisible and vice versa depending on what option is selected.
This procedure I call from the Click event of the option group, both the Current and Load events of the frmSiteDetails.
The controls that exist on each of the sub-subforms are bound to the same table tblWebSites as the controls on the main form (frmWebSites).
The selection between the sub-subforms works perfectly well between the 2 forms when I am on an existing record and am just viewing the data.
1. The first problem arises if I want to change the data on one of the forms.
If I change a value in any of the check boxes or combo boxes etc and then try and select the other sub-subform I get the Error message 'The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record.'
I can OK this and select the option button again and the page changes as it should and the data has been updated.
2. The second problem arises with new records. If I try to enter a new record by entering details into controls on the main form everything is OK. I then try to enter further data on the currently visible sub-subform, but as soon as I then try and select the option to make this form invisible and the opposite sub-subform visible I get the following error.
'The field 'tblWebSites.SiteName' cannot contain a null value because the Required property for this field is set to true. Enter a value in this field.'
I don't understand why this is saying it is a null value as this is the first piece of data that is entered into the form. Furthermore I don't understand why it is looking at the value of this field at the time it does.
This locks me up. I can still enter data in the remaining fields of the currently visible sub-subform but not change to the other.
Any ideas where my problem lies??
Please be gentle with me, I am a complete new boy at this and this is my first Database.
I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.
There are three subforms on the form, all pivot charts, all based on the query being changed.
The goal would be to update all three according to the user-given parameters.
Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.
I've also tried to requery and refresh them, with no result.
Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.
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.
I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.
Problem 1: The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.
To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:
I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.
If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:
My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?
Problem 2:
After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.
My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.
None of the attempts below worked giving a cannot find control error.
Private Sub Form_AfterUpdate() On Error GoTo ErrHandler
im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this
tblCustomer - tblOrders - tblItems
and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this
i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.
I didn't know that Access is supposed to only have 2 subform deep. On my form, I have three subform deep. However, the master form is unbound, not linked to subforms, and nothing more than a container for tab pages which contains their own subforms and has no code directly associated with data. There is a code to move subform to new record when tabs changes, but that's all.
Does that mean there is really only two subforms deep from the topmost form on the tab page or the subform depth has been exceeded whether the master form has no role in data transaction?
I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.
What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.
I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.
I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.
What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.
I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.
i have a form with 2 subforms. when the user selects a record in subform one. the date of that record filters subform 2. in the source query of subform 2 i have this under criteria
I am having trouble figuring out the method to automatically update some fields in SubForm from 2 other SubForms.I have attached 2 pics, the first GradeEntry1 shows what the tblTopic_Class_Grade form looks like after I manually enter everything into it. GradeEntry2 is what the form looks like when I fill out the Form starting at the top.
I'd like the tblTopics_Class_Grade form auto-populate the TrainingClassID (it currently does this), TopicClassID, StudentID, TrainingTopicID based off the entry from the above forms.My end goal is that I need to have a grade for each student on each training topic for each class. Like:
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?
All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"
I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup. I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work.
The forms in the code are subforms on a TabControl on a main form.
I have this code which needs to add together only the areas [Area] of records with a FloorNumber field value of 1 or 2 or 3 or 4.
At the moment the code works for one entry of 1 in the form frmRoomDetails. I'm guessing i need For Next or something like that but i don't know and also unsure of how to code it.
Private Sub FloorNumber_AfterUpdate() If [Forms]![frmSiteDetails]![frmRoomDetails].[Form]![FloorNumber] = 1 Then [Forms]![frmSiteDetails]![frmFloorsDetails].[Form]![Text8].Value = [Forms]![frmSiteDetails]![frmRoomDetails].[Form]![Area] End If End Sub
I have a subform within a main from which switches by entry. The subform is a datasheet. I have two dropdowns in the datasheet and I want to limit one off of the other. I keep getting a prompt. The prompt is Forms!CLTS Subform!Environment. To my understanding it looks like it can't find Environment. Does anyone know the proper format.
This is my code for the second drop down in the subform. Also special note Environment is what I am referencing to and it also is in the subform.
SELECT PackageName.PackageNameID, PackageName.PackageName, PackageName.EnvironmentID FROM PackageName WHERE (((PackageName.EnvironmentID)=[Forms]![CLTS Subform]![Environment])) ORDER BY PackageName.PackageName;
I have a main form which has a subform control in it. when the main form is opened the sub form control contains a list of events in a sub form (a summary view), for the person selected in the main form.
I want to change the subform to a different one which shows the whole event when i click in a field on the subform, based on the event i clicked in. ( i can do it by opening a new form but not with a new subform)
I can make the form change using the following code:
I use to Navigation form called "frmMain" and it's subform is "Transactions" and "frmTransactionsDetail". I just want to pass value from a field in "Transactions" Subform to other field in "TransactionsDetail" Subform by command button with vba syntax.
And Other one thing I want that, when I click a button Subform will refresh with vba syntax. How to refer.
I know how to use openargs to pass values between forms but im not sure how to go about passing all the values from one subform to another.
To be specific I have an order form (frmCustomerOrders) that has fields like CustomerName, EmployeeName, OrderDate and so forth, the subform (frmCustomerOrdersSubform) contains information on the Products the customer is ordering which usually has multiple records with fields like ProductName, PartNumber, Quantity and ItemNumber. I want to pass the values from the CustomerOrdersSubform form to another subform (TransferSubform) My initial thought was to use something like the openform command through openargs but im not sure if that will work or if there is another method I should use.
i have a main form with three sub forms on it. when i update subform 1 i want subform 2 and 3 to update..currently i have an after update event in a combo box subform 1
I have a problem with cascading combo box not working.
I have a one form and with two subforms
One form is "frmReviews" with a subform called "frmbyReviewer" Link Master Fields = Name and Link Child Fields = Reviewer_Name
Then we have the "frmbyReviewer" with a subform called "frmsubMain" where it's Source Object is another form called "frmMain" and linked by Loan_Number
I have two subforms on a form. When the user clicks on the 1st Subform the 2nd one will populate depending on what was selected on the first one. I have a click event but the 2nd subform isn't being populated correctly. Is this possible?
I have an SQL query that filters a subform based on the selected item in an option frame that runs on the after update event of the option frame. Forms!fsubPrjPersonnel.RecordSource = SQLText & WClauseWhen I try this out, I get the following error message:
2450 - xxx can't find the form 'fsubPrjPersonnel' referred to in a macro expressions or Visual Basic code.
I then ran the following snippet and found that the form is not recognized as being loaded when it is "open" as a subform If IsLoaded("fsubPrjPersonnel") Then MsgBox "form found" End If
If I open the subform as a form as well as having the main form & subform open, i.e. open a second instance of the subform from the database window, it filters fine.
I have been able to requery the subform so where am I going wrong?:confused: