Button On Main Form To Change Records Of All Subforms In Sync
Aug 29, 2012
I have a main form and four subforms all of which were created from the tables without queries. The main form pulls employees personal data (never changes). The subforms pull Events attended, Lodging at the event, Family that attended the event and Employee minutia which changes per event. I'd like to have a button on the main form that changes the records in view for all of the subforms at once. This way it is easier for the users and I know that I am view all the pertainent info for event A instead of viewing event A's lodging info with event B's family info.
I have a main form with multpile tabs - each tab containing a different subform.
Link Master Field: ClientID (field in Master Form) Link Child Field: Client ID (field in all subforms)
There is another field that all the subforms (continuous type) have: ObligorName. All the subforms are based off of a huge table (subtable) with fields: Obligor Name, Address, Zipcode, City, DOcuments Required, Bank Account Number, etc......
Essentially, the user will fill in the 10 obligor names associated to ONE client on the first subform on the first tab + address + zip code + city.
When the user clicks on the second tab to fill out the next subform, I want all 10 obligor names to be there already, so then they can fill out Documents Required + BAnk Account Number.
If I fill out the first subform and then exit out of the form and then reopen it, the other subforms autofill.
HOWEVER, I dont want to have the user have to do this. It wastes a lot of time. What can I do about this so that the table is automatically updated right away. They are all based on the same table so I do not see why there is so many issues.
I’m hoping someone can help a very confused newbie :confused:
While I have knowledge in using MSAccess I can honestly say I am well and truly stuck. I have searched the forum, but cannot find anything to help me out … if there is anything I am sorry for re-posting. While there may be helpful responses, they mostly involve code, which I do not know.
I have a Main Form (frmPreApprovedTravel) and numerous Subforms (sfrmFlightRail, sfrmHotel, etc). I have designed my Main Form with tabs and each tab contains staff details, flight, hotel, taxi, etc information.
My problem is that when I go to the next record in my Main Form I want the Subforms (all of them) to go to the next record as well. I know this is possible but having tried to figure it out myself for the last 2 hours, but know I’m still missing something!
I would appreciate any help and thank you in advance for the help and taking the time to read my problem.
I have created a database in microsoft access 2010 to show invoices for different customers in different countries. In doing so, I created using a two subforms in a main form. I have used the "country name" to link the subforms to the main form. When I enter new records into the subforms for a specific country, I realized that a duplicate record of an old record are being created in the subforms. What can I do to prevent this from happening? I tried to change the query link between the main form and subform to "invoice number" but the same problem has occurred.
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.
I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)
i have a stock control db. when new stock is ordered it updates 'units on orders' field, then when goods are recieved the subform field is updated and this automatically updates the 'units on hand field'.
i then have another subform for stock going in and out, i would like to be able to have the units on hand field as above (which is the main form) automatically updated like is when using the the goods recieved sub form??
not sure if i explained it properly but i can send the structure if that helps?
I use Access 2003 and have created a form with several subforms which I've placed onto a number of tabs. I'd like to have some of the most recently entered data from the subforms displayed on the main form.
For instance - if one of the subforms details the repairs to my car, in terms of date, items repaired, name of the mechanic and the cost, I'd like the most recent date of repair to be displayed on the main form. I know that I can see it be clicking the "Car Repairs" tab then scrolling down the information, but I'd like to have it displayed for easy viewing. I'm not sure if I'd need to have some VBA to do this or if it can be achieved by, for instance, creating a query to populate the appropriate textbox on the main form.
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?
I have a main form with a combo which lists all forms in my database. There is also a button which open all the forms depending on this which I will choose from my combo.
Private Sub Command2_Click() DoCmd.OpenForm Me.cmbforms End Sub
Is there any way to open the forms in a subform in my main form?
My main form was working fine (I could key in data) until I added two subforms. Now the main form will not accept data, but the two sub forms do accept data. I have searched properties of all forms and queries, and I cannot find any suspects.
I am trying to link two unrelated sub forms to a main form so I am able to query data all at once and make a report that displays all this data at once. I do not know if this is possible. I will tell you to the best of my ability about what I have going on.
My main form is a shift report. The primary key is a auto number ID. The rest of the fields are date, name, shift, vehicle. etc.
The first sub form is area attendance. Field are as follows auto number ID (primary key), report ID(which comes from the main form, linked), the area, and the area attendance.
The second sub form is the event log. Fields are as follows auto number ID (primary key), report ID(which comes from the main form, linked), time in, and events.
My relationship now is simply primary key from the shift report (the autonumber) going to the first and second subforms report ID's.
Problem is I can not query two distinct subforms like this (I realized).
I have a form with several subforms for entering information while surveying rooms in a building. I am trying to create a button to copy records from one of the subforms if the data is the same (for example if there are 3 types of flooring in multiple rooms) and append it into the same subform with a different space ID. I can not get it to recognize the Space ID on the current record. This is what I have in the command button code:
Private Sub AppendFloorCmd_Click() Dim FloorTypes As String, SpaceUpdate As String Dim CurrentSpace As TextBox Set CurrentSpace = Me.SpaceID FloorTypes = "INSERT INTO FlooringSurveyTable (FlooringHomoID)" & _ "SELECT FlooringSurveyTable.FlooringHomoID FROM FlooringSurveyTable " & _ "WHERE (((FlooringSurveyTable.SpaceID)=[Enter Space ID to copy]))"
[code]....
When I click the button, it appends the right records but makes me type in the current space ID - I've tried a bunch of ways of naming that control, but it will not work.
I have a main form "frmDriverNoticeRecord" with 2 subforms, "frmSubDriverNotice" and "frmSubVehicleRecord"..The main form uses "IncidentID" as the PK. Each form stores data in its own table. The tables are related via IncidentID and there is a 1-many relationship between tblIncident (main) and tblDN (sub) and tblVehicle (sub).
I have a form "frmIncidentLog" displaying records in a table view with a few fields for quick reference and to allow selection of a single record for detailed viewing. I created a command button with the intent to open the "frmDriverNoticeRecord" at the current record. The main form and child link fields appear to be linked correctly; i.e. IncidentID on all three. If I open the form manually it opens and I can use it and search and filter as I want. If I try to open it via the command button It opens a small window asking for the IncidenID, when I enter theIncidentID number, it opens the form to the first record every time.Here is the code:
Private Sub comOpenDR_Click()
Dim frmName As String Dim recID As String frmName = "frmDriverNoticeRecord" recID = "[IncidentID]=" & Me![IncidentID] DoCmd.OpenForm frmName, , , recID End Sub
I tried running the the DoCmd.OpenForm command directly from the button using the where condition (in various manners) with the same results.
I am attempting to create a patient tracking database for a clinic I work in and I am stuck at one small but major part.
I have a parent form called frm_Patient_index. On this form you can enter patient details such as personal details, observations ect. I need to create a lab request form for certain tests to be performed.
I want so that a button on the frm_patient_index form opens a subform where the relevent tests can be requested via tick boxes. Now here is my problem I have managed to create all of that except for the information to be entered into the frm_lab_request automatically and get SAVED to its corresponding table. It will not save for me.
I can get the information such as Badge Number, First Name, Surname and DOB to all enter into the fields automatically but getting them to save to the table is not happening.
I have an access form (Customer) along with a sub-form (Work_done). On sub-form I have Running sum of Amount in Text box-1. I want that Total of Running sum be replaced with Main form's tables field total_amount. Is it possible that we can replace an amount of control of sub-form into main form's field?
I am trying to create a command button that will delete the current records in both the subform and main form.
I know how to create a command button that will delete the current record of which ever form I'm in (either the sub or main form) but I wish to do so both at the same time with one event procedure. I currently have been experimenting with a button in the subform but I don't really care if it's in the subform or main form.
I have a subform that displays doubles in a textbox as fixed with 4 decimal places as default. I have been trying to change the number of decimal places based on the value in a textbox on the main form. I have tried this:
where [Final PCT] is the textbox on the subform containing the decimal number and Numdecs is the textbox on the main form containing the number of decimals I want to use. I want to implement this Form_Current sub.
I have a tabbed form in a navigation form with a chart on it. The records source of the chart is a query. The query runs when you click the tab and takes a long time. I changed the Row Source of chart to "" and that eliminates the query running on form load. I've read many posts on changing that row source when a command button is clicked. I tried
in the onclick event of the command button. This doesn't work. I've tried many variations of the syntax. I don't know if I have to tell the query to run after the row source is changed.
On a side note, the query criteria is based on beginning and end dates entered into text boxes on the form. This all works if the query loads when the form is opened.
Can someone help me with this... I've got a main form with 6 subforms. The main form is associated with the "one-side" table. Each subform is associated with its own "many-side" table. What I would like to do is be able to click a button on the main form to make a copy of the record and all associated records in the "many-side" tables, but obviously with the new records having a different primary key. What is the best way to go about doing this?
Hi everyone!! This is my first thread in this forum..Hope to get best from this site ..well i m facing a problem..i have a main form and a subform (which is in datasheet view) . Now i have a button called "close_form" in main form on whose click event i have writen this code :
Private Sub close_form_Click() On Error Resume Next DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70 Me.Controls.Item("fees sub").SetFocus DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70 DoCmd.Close End Sub
1. If i run this form directly from Access and there are no changes i do in the form and click this button then it gets hang after showing error "run time error 2046 ; the command or action undo is not available now " "press End or Debug or help"
2. As i have created a Custom menu, if i run this form from that menu then it does not show any error. But it runs fine for the first time but nothing happens on clicking this button the second time i open the same form ( in same session). What to do ?? Please help .. shikha
I have VBA code for a Print Preview button on the main form that previews the current record in a separate Report using this code:
Code: Private Sub cmdPrintRecord_Click() Dim strWhere As String
If Me.Dirty Then 'Save any edits. Me.Dirty = False End If
[code]....
I use this Print Preview code on a Button in the Form Header. The Main form lists head of household information. I also have a tabbed control with three tabs that have SubForms for Address, Children and Contact details. The problem I have is that if any of the subforms are left blank I get a Run-Time Error '3021': No Current Record. If I Debug (press the button), it takes me straight to this line:
highlighted in Yellow.Anyone on my database must have an address, should have contact details and could have children. If any one of these is blank then the print preview will not work.I would like to know how to stop this error happening for blank records in my subforms.