Accessing Subforms Through Mainform Isnt Working???
Apr 2, 2008
Hi there guys,
Im in a bit of a predicament, I have a main form with 3 subforms named:
Debit/Cred income for day subform
Cheque income for day subform
PDC income for day subform
and in each of these subforms, I have a field/text box (From a query) which is called "SumOfTotal Cost"
and also in the mainform I have another field/text box called "text73"
Now, all I wanted to simply do was to add all of those fields mentioned together to display them on the main form in another text box as a total so I tried to use this expression in the control source:
=Me!Text73+Me![Debit/Cred income for day subform].Form![SumOfTotal Cost]+Me![Cheque income for day subform].Form![SumOfTotal Cost]+Me![PDC income for day subform].Form![SumOfTotal Cost]
But when i open the form, the text box just appears saying
"#Name?"
I then tried to put brackets at the ends of the code, but still nothing would work, I then tried to access each individual "SumOfTotal Cost" by putting the following in a text box:
=Forms![Cheque Income For Day subform]![SumOfTotal Cost]
but it still comes up with "#Name?".
I am pretty annoyed and I would really appreciate it if someone could please help me
Thanks a lot
View Replies
ADVERTISEMENT
Mar 7, 2007
Private Sub Command40_Click()
On Error GoTo Err_Command40_Click
DoCmd.SetWarnings False 'Turn Warnings Off
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SetWarnings True 'Turn Warnings On
Exit_Command40_Click:
Exit Sub
Err_Command40_Click:
MsgBox Err.Description
Resume Exit_Command40_Click
End Sub
In essence its just a save record button which has a macro attached to it to run on mouse down. This macro runs a query to update a table which then updates the form upon saving. The warning messages to say it is deleting the old table and updating with new values keeps popping up even though im using the above code. Any idea on how to supress these warning dialogues when i click save?
View 5 Replies
View Related
Feb 8, 2006
Hi,
I had a text box on a main form linked to a text box on a sub form using the following control source =Forms!Form![frm_Doctors_details subform].[Form].[Title]. This was working, however I had to play around with the subform alot and now the link isn't working. All i get in the field is #name?. Nothing has changed on the subform textboxs, just that I added a primary key to assist in the linking action bewteen forms. I can't for the life of me get it back to what it was . any ideas??
Thanks in advance
View 4 Replies
View Related
Aug 7, 2015
I need to make my mainform fields required before any data can be entered into subforms. Mainform and Subforms are linked with LinkMaster Child ID. This should only be applied in this form.
View 4 Replies
View Related
Jul 25, 2006
I have two subforms. They are in nice neat grids as access setup for me. Both of these forms should have similar data, based on a upc. What I need to do is turn the text of an entire row to red when there is no matching upc in the other subform. The two problems I cannot figure out is as follows.
1. How can I access the forecolor property of a text box in a subform from the main form?
2. How do I access only one row of data, in the default grid?
Any help would be greatly appriciated.
View 1 Replies
View Related
Mar 18, 2015
With a many to many relationship using a junction table, do I have to manually plug in the ID numbers from the related tables in the junction table for it to recognize the related data? It sounds silly and obvious I guess that you would have to, but when I go to create a form based on a many to many relationship, I would like the ability to enter data without having to enter the related ID numbers in multiple places on the form or subforms to make it work. I guess I envisioned access using auto numbers to automatically update the junction when I wanted to add data related between the "main" table and the distant table joined with a junction. Can this be fixed using a Parent/Child relationship set-up in some fashion?
View 1 Replies
View Related
Aug 16, 2013
I have a form with sub-forms. All the subforms work smoothly, I am able to assign students to classes, enter their late/absence data etc... But there's 1 subform that I want to include the Gender (male,female) so I have to go back to the query (see attached picture) to include the table with gender data and map it with other tables, then insert a combo box in that subform, which display the gender of the student along side with other data.
But the problem is as soon as I modify the query for that subform, all the subforms (including that one) stop working, I'm not able to enter and change anything with error like Recordset is Noteditable ( see attached screenshot).
And after I remove that table from the query and the combo box from the subform every works just fine again.
View 3 Replies
View Related
Mar 25, 2008
hey again, i usually don't post this much and prefer to work it out alone but i have no idea why this isnt working (and the error im getting)
below are screen shots, i am trying to make an improved booking system, but i don't know why its saying i have a null value (i went through and made sure all fields are filled, in all related tables just to make sure)
http://i71.photobucket.com/albums/i136/King-b-/QueryPrimarykey.jpg
http://i71.photobucket.com/albums/i136/King-b-/QueryPrimarykeydesign.jpg
Is your BookingID set to autonumber? If it is an autonumber, where does the B come from?
no i have them all set as text with a inputmask of B000 (so booking numbers have to start with a letter (b) followed by three numbers)
(i edited and made new post as had a vague, uninteresting title)
View 14 Replies
View Related
Jun 21, 2005
i have a form porblem. I have a search form embedded onto my main form its really a listbox that when i click the records in it they display the record.
prob;em is that when i delete the record it still shows in the listbox
View 1 Replies
View Related
Feb 4, 2006
I forum could someone tell me:
I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links.
When I try to link them it says you cannot link items on an unbound form.
regards in advance
Peter:eek:
View 1 Replies
View Related
Jun 2, 2005
How do I implement a db with a MainForm and several ChildForms (which contain subforms) and each form sourcing data from its own table (MainForm-MainTable, ChildForm1-ChildTable1, CF2-Ct2,... SubForm1-SubTable1,...). There are buttons in the MainForm to navigate to the ChildForms. How to link, relate or make the db work, so that the every record from the MainTable has an related record in the ChildTable?
thanks in advance...
View 1 Replies
View Related
Dec 21, 2005
I have a form called “frm_TrainingLog” based on “TrainingLog” table. This form is continuous and tabular – I need to have it this way. In the header of this form I’ve created a listbox called “QuickSearch” which displays staff details i.e. StaffID, Name etc.
The mainform and the listbox are linked using the following code:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[StaffID] = " & Str(Me![QuickSearch])
Me.Bookmark = rs.Bookmark
The above code does partially work and selects the right record in the mainform but it doesn’t filter out rest of the records which are not equivalent to selected StaffID from the listbox.
I could really do with someone’s help….thanks
View 2 Replies
View Related
Aug 22, 2006
Hi!
I have a mainform, with a popupform, on which I want to select a record/post
to work with on the mainform. I have managed to select the actual post on the popup, but i dont know how to make the mainform navigate to that form.
How do I easiest accomplish to make the mainform navigate to the record I've selected on the popupform?
thanks for your reply ;)
View 3 Replies
View Related
May 1, 2005
I have a main form with a control that can take one of three values. And I would like to add a subform that work as follows.
Selecting each value should change what the subform displays like this.
Control Subform
A Select * from TableA where Key = "A"
B Select * from TableB where Key = "B"
C Disable subform somehow because it doesn't apply
Could someone please provide some advice on how I could do this.
Thanks
Fearless
View 1 Replies
View Related
Jul 5, 2005
Hi,
I am assuming Access cannot handle Many to Many relationships very well.
I have an Account form ("MainForm") with an embedded SubForm that displays only the Account Address with suite number, street number, street name, street type. Account to Address is a Many to Many relationship. My Account form's source is tblAccount, and the SubForm is built off of a query of 3 tables -- Querying Account, LinkTable, and Address table. The link between the SubForm and the "MainForm" is done via AccountID.
My problem is, when I query for an Address (say entering a street number of 25), I want to get back all the addresses with street number of 25 AND the corresponding Accounts that have street number 25 only
What it does is return the addresses with Street Number 25 and ALL the accounts regardless of what their addresses are!
Is there a way to do this?? Can I design a form without using a SubForm in this case, ie, display the account and its many addresses? Or does Access Forms not support Many to Many Relationships? I'm thinking the link table is causing the problems here.
Please advise -- this "simple" project is becoming quite the headache! :eek:
"edit" -- I also notice this problem with a 1 to Many relationship (the "many" portion being the subform)
Thanks for any help,
Mike
View 3 Replies
View Related
Dec 13, 2006
Hi,
I want to open a subform programatically with a 'linkcriteria' filter.
However, What i am experiencing is just the subform opening without the main form.
How can I open the subform on the appropriate record and the mainform as well, as one??
Thanks
View 3 Replies
View Related
Mar 9, 2005
Hi,
i'm working in access 97 and am having difficulties pulling a subtotal or referencing any fields on my subform on my main form. I've searched the forum and help and tried to apply the info provided, but i still can't seem to get it to work.
as far as i can tell this should work:
=[MySubForm].[Form]![TxtTotalStaffNumbers]
but i'm still getting the dreaded #Name? error.
anyone got any clues as to what i'm doing wrong?
what about the case where the subtotal i'm referencing is a calculation such as =Sum([Quantity]*[FacilityArea]). Should i still be able to reference it on my main form by pointing to the name of the field?
Thanks very much!
View 3 Replies
View Related
Mar 15, 2005
All:
Currently have a Form / SubForm arrangement combining qryItemAllowedAndUnschedlued with tblInventoryItem.
The main form is based on the query and the subform on the table.
My effort is to create cascading combo boxes where a selection in the main form populates a "conditional" list in the subform.
More specifically, where the user selects ItemClass in the main form, I am attempting to populate a list of ItemCategories in the subform based on the selected ItemClass.
I have reviewed and continue to study existing posts on Cascading Combo Boxes and Form / Subform arrangements. However I currently have a question I do not see covered...
When I select my ItemClass it is populating throughout the query and not solely in the current record displayed.
Does anyone know why this may be?
I fear the answer is a simple setting that my current experience is making difficult to isolate. I trust it will present itself with patience, but in the interim more experienced feedback is welcome!
Regards
View 1 Replies
View Related
Oct 1, 2005
I have a form for entering data and to aid people inputting data into a text box I would like a pop up form to appear to enable them to refresh their memories as it were with some information. I was going to use the got focus event of the text box to open the popup but how do i then pass the focus back to the main form and text box without triggering the event again
on the flip side I would like to use the lost focus event to close the sub form as well.
any suggestions greatfully received.
Have a Great Weekend, one and all
Dave
View 3 Replies
View Related
Oct 8, 2006
Hi,
I have a query (SelectedData_Query) , on which a form (SelectedDataQuery_SubForm) in datasheetview is based, which is placed on a form (NAWInvoerForm) where customer adress data is put in. When someone clicks new case button on the NAWInvoer_Form, another form (CaseDateTimeInfo_Form) is opened, data is entered, but when the "CaseDateTimeInfo_Form" form is closed, the data in the subform in datasheetview on the NAWInvoerForm is not yet refreshed. So I tried the following:
Private Sub Form_Close()
'------------------------------------------------------------
' RefreshNAWInvoerForm
'
'------------------------------------------------------------
On Error GoTo RefreshNAWInvoerForm_Err
DoCmd.OpenForm "KlantNAW_InvoerForm", acNormal, "", "", , acNormal
DoCmd.RunCommand acCmdRefresh
RefreshNAWInvoerForm_Exit:
Exit Sub
RefreshNAWInvoerForm_Err:
MsgBox Error$
Resume RefreshNAWInvoerForm_Exit
End Sub
Which works just fine. After the form is closed, the name, adress and cases overview form is reopened and refreshed, thus the case that has just been created is shown nicely in the subform which is based on a query.
But it is starting to become bothersome, sometimes when I close the form in which I create a new case, I don't want to have the other form (NAWInvoerForm) reopening again.
So how can i make it so that when I close the form only the data in the "NAWInvoer_Form" is refreshed, without having to reopen the form again. I mean, in the background, the form is still open anyway. It just shouldn't keep popping up everytime.
It can't be hard, but I can't see it. I'm new at this. I have found some similar topics on this forum, but none which helps me out enough.
It should be something like:
On "thisandthatevent" do a "thisandthatcommand" on "thisandthatsubform" in "thisandthatform"
If I know how the syntax of that is done, it would help me out with some other problems I see coming in the near future. I've looked at, and tried some things based on this link: http://www.mvps.org/access/forms/frm0031.htm
But without success.
Can anyone help?
View 4 Replies
View Related
Jul 30, 2014
I have a form "Clientfrm" with a field, "ClientID".
I have another form, "HomePage", with an unbound combobox with rowsource "ClientID" from Clientfrm. Along with that, I have an Open Form button that pops up "Clientfrm" to display existing data if an existing ClientID is typed.
SITUATION: A nonexistant ClientID is typed into "HomePage", a blank "Clientfrm" pops up with the field "ClientID" blank on the Clientfrm. Once filled out and closed, I am back to the "Homepage" to enter another "ClientID". However, the combobox does not display the new "ClientID" until the "Homepage" is closed and reopened. How do I fix this?
I tried the Me.ClientID.Requery on the On change event of the combobox of the "Homepage", but that is not working. What should I do? SHould I instead put that code in on change event in the "ClientID" field in the "Clientfrm?"
View 14 Replies
View Related
Jun 25, 2005
May be this is easy for your guys. I want to freeze or lock the mainform data fields while allowing users to input, edit, delete data on a subform. I tried to change mainform properties so it can not edit, add or delete data on mainform. By doing so, I cannot do anything with subform, it seem read only as well.
Thank you for help
Peter
View 1 Replies
View Related
Nov 4, 2004
I'm new in access world. please help. I have many forms that control by On click command from the main form. One of the form (which is Calendar form), I like to have password protect in away that only the right ID or password would have access to edit this Calendar, If not users can only view it. Is this possible?, if it is can you please provide some code for me...Thanks in advance..
View 1 Replies
View Related
Jul 28, 2014
My Database is really simple, it contains 1 table (called Querys) and a form called Dashboard.
In my main form (Dashboard) I have inserted a sub form which shows all the records in my table (called Querys) when I use my main form and add a record this sub table can then be refreshed and it shows all my records.
This part is fine,What I would like to do is be able to select a record in my sub form and it show the record data in my main form. This would really speed up the navigation process as the database gets bigger.
View 3 Replies
View Related
Dec 13, 2013
I have a form which shows training events - these can take place over one or several days, and can be run by one trainer or several, so I have my basic Events Info in one table (EventID, EventType, Location, that kind of thing) and the 'Jobs' in a separate table (EventID, JobDate, TrainerID, etc)
The problem I'm having is that I want the List of Events to be sorted in order of their start date... which is on the subform, not the main form.
How can I go about it - and still leave both the main and subforms fully editable?
View 12 Replies
View Related
Jul 25, 2013
I'm having issues with this one.
Table name is CompDates
Subform is ViewByMarket
Start date is Text13 and End Date is Text15.
I want it to filter out any matches between the 7 fields. Here is my code:
Code:
Private Sub Command19_Click()
Dim strFilter As Variant, _
strSDate As String, _
strEDate As String
'check Text13
Text13.SetFocus 'set focus to Text13 to be checked
[code].....
It will only filter for Build Date 1 and not for any of the other fields.
View 1 Replies
View Related