Forms :: Moving A Subform Within A Subform Of A Form?
Aug 19, 2015
I often move sub forms up and down within a form using something like.
Code:
forms!MyMainForm!MySubform.form.top = 500
However, I am having trouble moving a subform within a subform of a form.
Code:
Forms!MyMainForm!!MySubform!MySubformSubForm.form.top = 500
View Replies
ADVERTISEMENT
Aug 28, 2013
I have two subforms on a main form. When I move out of the last control of the first subform, I use the following code to move to the first control of the second subform:
Forms!frmFMVisit!frmSubFamilyEthnicDetails.SetFocu s
This is giving me problems in that it appears that moving out of the control in this way seems to be creating a record in the table on which the first subform is based.I get the following message: 'Cannot the value 'NULL' into column 'DoB'; column does not allow nulls. INSERT fails.'Is there a way to navigate between subforms without this happening?
View 5 Replies
View Related
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
Mar 24, 2015
When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.
I want to move to the next record in the subform without affecting the main form.
View 1 Replies
View Related
Aug 21, 2014
When moving from a subform back to the mainform and requerying one of the mainform controls, the record selector of the subform moves back to its first record. ...
GoToRecord (,,Next) '(in the subform-this is correct)
SelectObject
Object Type Form
Object Name pv '(go back to the main form)
In Database Window No
GoToControl (SubTot)
Requery (SubTot)If I remove the Requery, the record selector remains where it is supposed to be. The SubTot data source does include the aggregate dsum value of the subform's underlying table. What is strange is that this has been running properly for many years until it was upgraded from .mdb to .accdb format. Is there an easy way to make the record selector stay put?
View 6 Replies
View Related
Dec 3, 2005
Greetings,
I have a subform where I can edit data and I have the following code;
Public Sub GotoNewRecord()
If Me.sumtransvolume = me.TotalLitres Then
Me.LabOpNumber.SetFocus
Else
DoCmd.GoToRecord , , acNext
End If
what occurs is that focus moves to a new record not the next record.
I am puzzles by this? Any clues how to fix this and get the control moving to the next record (some subform has 10-15 records)
rbinder
View 3 Replies
View Related
Jan 17, 2014
I have a subform with records of call details (date, time, subject) - the date and time are autogenerated and subject is a text field. After entering text in the subject field and then clicking on the close button in the main form, or clicking anywhere else in the main form, the record is saved to the table. However, if I enter text in the subject field and then move up to view previous records (within the subform) and then click the close button in the main form the record is not saved in the table. How can I either save the record before allowing the user to move to another record within the subform or before exiting the subform set the focus to the new record so that it will be saved on exit?
View 4 Replies
View Related
Mar 30, 2015
I have a Form named Clients with a multi-page tab named TabCtl0.
The record source tables - primary key is [ID] , TabCtl0 has 7 tabs, the 1st named General.
The 1st 6 tabs show information from the same record.
The 7th tab contains a subform named Focus displaying continuous forms with 3 fields in each record including [ID].
What I am trying (for hours and hours without success) to do is to create a Macro that fires when I double click on a control within subform Focus that takes me to the page named General and selects the record where ID = the ID within the selected record of subform focus.
View 1 Replies
View Related
Sep 16, 2014
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.
View 7 Replies
View Related
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
Jun 20, 2013
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
frmCustomers
- sFrmCustomerItems
- sFrmCustomerOrders
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.
View 5 Replies
View Related
Oct 8, 2013
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
Code:
[Forms]![frmeventbuild]![frmBUILD]![EVENT_DATE]
View 3 Replies
View Related
Feb 11, 2014
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:
Class1-Student1-Topic1-GradeX
Class1-Student1-Topic2-GradeX
Class1-Student2-Topic1-GradeX
Class1-Student2-Topic1-GradeX
View 6 Replies
View Related
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
Jul 26, 2013
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.
View 14 Replies
View Related
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
Apr 15, 2014
I have a form with four unlinked sub forms on - I am hoping to
1) add a value from one subform to another and more importantly
2) update 1 subform when the other is amended...how exactly do I reference subform 2 from subform1.
I have tried me.parent!form2 and forms!mainform!form2.requery etc but can't get it right
View 7 Replies
View Related
May 27, 2014
On a main form i have a continuous subform listing Jobs.
On the Click Event i want to display the personnel and equipment separately in two additional subforms linked to the Job i have clicked on by JobID.
I have tried all sorts of references and currently have this:-
Forms!PersonnelAndEquipmentMovementFrm.PerEquipMov Jobs.JobID = Form!EmployeeSubform.JobID.Text
Which does not work?
View 4 Replies
View Related
Mar 29, 2014
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.
View 1 Replies
View Related
Aug 25, 2014
Is it possible to attach a subform2 to subform1. Subform1 is already attached to a mainform. e.g. Recipe Info = Main form (Apple Pie)
-Recipe Ingredients = Subform1 (Flour, Milk, eggs)
-Ingredient Breakdown (Flour = baking soda + wheat + salt)
The relationships between primary keys etc becomes confusing to me.
View 3 Replies
View Related
May 8, 2014
I have a main form with a couple of tabs, forms and subforms (see attachment). The problem is that when I click on one of the blue record navigators, I want the right subform to requery. I can't get that to function properly.
Until now I'm just using the Macro Builder and little to no VBA. There is a function Requery in the MB, but I keep getting error messages that the object doesn't exist or nothing happens at all.
I've read the page on Access mvps about linking to forms, but I'm still doing something wrong.
When I used some VB like:
Me.Parent!frmStagesPerLeerling2.Form.Requery
it did work, but I an into problems with setting the visibility of the navigation buttons (they should only show when there is more then one record in that subform).
View 3 Replies
View Related
Apr 18, 2005
I need to requery a subform from a third form and can't seem to get it to work.
frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the form frmUpdateAddress where all of my validation work is done and the new record is added.
However, the new address is not being displayed in the subform.
If I use the command
Forms![frmTest]![frmAddress].Requery
it works fine.
The problem is that I want to be able to frmAddress on any form, and need to pass the name of the main form (in this case frmForm1) as a variable.
If lsTemp = "frmForm1", the statement
Forms![lsTemp]![frmAddress].Requery (and every variation using brackets and quotes that I can think of) fails.
Any ideas?
Thanks!
View 3 Replies
View Related
Sep 27, 2013
i have a main form for customers and a subform for sites which is set to locked so its displayed as just a list. I have a button on my main form to add a new site for the current customer displayed..How can i get the Main form '1CustomerDetails' with subform '2SiteList' to automatically refresh one i've clicked the save button on another form.
View 1 Replies
View Related
Feb 11, 2015
I have a Navigation form that has multiple forms that I linked to buttons at the top. They open the forms (now subforms) for the most part just fine. The issues come into play when I click on a combobox that pulls from a query of a table. Once this data is selected I have another combo box that is supposed to be filtered based off of the original combo box selection. Everything works on the original forms but once they are in subform form I get the error "Forms!MGM Search Form!STATE" which is the name of one of the forms and its asking for me to enter a parameter value for the query. Its almost like its not requerrying the data like it does in the original form
Private Sub State_AfterUpdate()
me.Facility.Requery
End Sub
basically the first combo box is a list of states and then the second combo box is a list of facilities in that state. Once you click on the state in the first combo box it filters the facilities in that state. But again once in the subform view it will not requery.
View 2 Replies
View Related
Nov 20, 2013
I have a subform which is controlled by a query eg . Fname&" "& Lname as Name, order_number. and i have form which have combobox.
When form opens the query works fine but when i search value order_number in combo box it gives the result but with ?Name in Name column.
I know i can do this with Filter method, and rewriting the query, but i want to use it by passing the value in query of subform.
View 3 Replies
View Related
Aug 21, 2013
I'm novice in access 2007 I've a project that contain a Table a form with Subform bound to that table, on tthe main form I've unbound [text boxes] and a [search button]. I want that my form act as a search form , so when I click the search button it show the only result an that table subform. I've read a couples of article, it look like I've to use some VBA code!
View 4 Replies
View Related