I have a tabbed form with several subforms on the tabs. The database is an IT problem management database. The first tab has the information for the Failed Component, the thing that originally broke and made everything else go haywire. The Failed Component tab has a subform named fsubFailedComponent with the name of the failed component. FsubFailedComponent contains fsubFCImpact which is a continuous form that has all of the start and end times times for the failed component.
The next tab is for the various User Facing Applicaitions that were impacted by the failure of the Failed Component. It can have several applications, several locations and within the locations several business units. It has a subform named fsubUserFacingApps which is pretty much like fsubFailedComponent. It has the name of the application and a subform, fsubUFAImpact, with the detail info. My boss wants me to add a button to fsubUFAImpact that a user can click which will copy and paste the start and end times from fsubFCImpact tab to fsubUFAImpact, but still make it editable in case the impact started later or ended earlier.
Thanks!!
5 2611
I have a tabbed form with several subforms on the tabs. The database is an IT problem management database. The first tab has the information for the Failed Component, the thing that originally broke and made everything else go haywire.
The Failed Component tab has a subform named fsubFailedComponent with the name of the failed component. FsubFailedComponent contains fsubFCImpact which is a continuous form that has all of the start and end times times for the failed component.
The next tab is for the various User Facing Applicaitions that were impacted by the failure of the Failed Component. It can have several applications, several locations and within the locations several business units.
It has a subform named fsubUserFacingApps which is pretty much like fsubFailedComponent. It has the name of the application and a subform, fsubUFAImpact, with the detail info.
My boss wants me to add a button to fsubUFAImpact that a user can click which will copy and paste the start and end times from fsubFCImpact tab to fsubUFAImpact, but still make it editable in case the impact started later or ended earlier.
Thanks!!
You will need something like the following code. Substitute your Main Form name for [MainFormName] and correct the names of the StartTime and EndTime fields and substitute your command button name for cmdButtonName. -
-
Private Sub cmdButtonName_Click()
-
-
Me.StartTime = [Forms]![MainFormName]![fsubFailedComponent].Form![fsubFCImpact].Form![StartTime]
-
Me.EndTime = [Forms]![MainFormName]![fsubFailedComponent].Form![fsubFCImpact].Form![EndTime]
-
-
End Sub
-
Hi M,
I tried your solution which was similar to what I did before posting and got the same results. It doesn't seem to 'write' the copied dates to the table. I have a field which calculates the duration of the outage, it showed #ERROR when I did it at first, then when I tried your solution, it showed the same result it had when I hard coded my birthday in on a previous try. Then when I closed the form and reopened it on that record, the copied dates were gone. I'll try a requery or refresh and check back here again.
Thanks,
John
Hi M,
I tried your solution which was similar to what I did before posting and got the same results. It doesn't seem to 'write' the copied dates to the table. I have a field which calculates the duration of the outage, it showed #ERROR when I did it at first, then when I tried your solution, it showed the same result it had when I hard coded my birthday in on a previous try. Then when I closed the form and reopened it on that record, the copied dates were gone. I'll try a requery or refresh and check back here again.
Thanks,
John
John
Have you set the control source of the controls to the appropriate fields?
Mary
John
Have you set the control source of the controls to the appropriate fields?
Mary
That was it!! I just noticed that for some reason the fields were unbound! I guess I inadvertantly did that while messing around with it before. Thanks for pointing me in the right direction Mary! It works like a charm now!
Reason: chair to keyboard interface malfunction
I've had one of those before.
I sympathise
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tlm |
last post by:
Hello All,
I have a form (FrmA) with a subform (SubFrmB) embedded in it. SubFrmB also
has a subform embedded in it (SubFrmC) The form's recordsource is based on a
table (TblA). SubFrmB's...
|
by: david |
last post by:
Hi,
I've been reading tons of posts on how to copy records, but to no
avail....i'm still stuck.
There are three tables: Main, Sub-Form1 & Sub-Form2
I have a form which displays some data....
|
by: David Rysdam |
last post by:
I have a large amount of data that I copy in and out of Sybase very
often. Now I also want to copy this data in and out of postgres. I
have an existing script that creates the entire database(s)...
|
by: Stephen D Cook |
last post by:
I have a search form with a query-linked subform.
One of the fields in the subform are date fields.
Is there a way to autopopulate the DateFilled field when the person
enters the field? I need...
|
by: Shawn Yates |
last post by:
I have a form with two subforms on it which are both continous forms.
The subform on the left shows the tasks that the employee was assigned
to accomplish (each as a seperate record) while the one...
|
by: Ericks |
last post by:
I want to highlight new data that has been entered in my database since a last meeting so it is easy to see in a subform’s table what info is new.
In my database I have a table called...
|
by: Mclaren |
last post by:
Hi
I have a main single record form that has a date field on it pupulated from primary table, i have subform (datasheet view) which is populated from the many table. the subform has a field that...
|
by: informankur |
last post by:
Hi All,
I am trying to create a form for updating values. I have a Table - ASP with Date, Product, Q1,Q2,Q3,Q4 fields. I have a Form ASP_Main with "Date" field for filtering by the date selected....
|
by: OzNet |
last post by:
I have a form with a subform and I need to filter the records in the subform by dates. (Access 2007)
The main form has two unbound text boxes called StartFilter and EndFilter. Both use the...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
|
by: SueHopson |
last post by:
Hi All,
I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...
| |