T
tmdrake
I have a:
MainForm = record source "tblProject Staffing Resources".
On the MainForm there are 4 comboxes:
ProjectID = row source "qryProjectID
Discipline Name = row source "qryDisciplineName"
Section Number = row source "qrySectionNumber"
Last Name = row source "qryLastName"
There is also a select button and a clear button. Once a selection is made
from one or a combination of combo boxes the select button is clicked and the
results display in a subform = record source "SELECT [tblProject Staffing
Resources].ProjectID, [tblProject Staffing Resources].DisciplineName,
[tblProject Staffing Resources].SectionNumber, [tblProject Staffing
Resources].LastName, [tblProject Staffing Resources].FirstName, [tblProject
Staffing Resources].[Discipline Lead], [tblProject Staffing Resources].[Est
Project Start Date], [tblProject Staffing Resources].[Est Project End Date],
[tblProject Staffing Resources].EmployeeID ".
What I need to know is how to place the total hours worked for whatever
selection is made in the combo boxes, in a text box on the Main Form. The
hours are located in a table named "tblHours_worked".
Also, on the subform, once a selection is made and the results are displayed
in the subform, I have it so if you double clicked on one of the above fields
(combo boxes) in the subform, two prompt boxes pop up asking for date range.
The problem is if I double click on the LastName on a specific ProjectID, the
records show for that lastname and all the ProjectIDs associated with that
name. How do I just the show the records for that specific record with that
specific ProjectID and not all the Projects.
Below is the code I have:
Private Sub LastName_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = Me.LastName
stDocName = "frmHours_Worked_subform"
DoCmd.OpenForm stDocName, acFormDS, , _
"LastName = """ & stLinkCriteria & """" _
This is assuming the criteria selected in the MainForm Combo box is Last Name.
Then what code do I use for the double click so that the information opens
in a Excel spreadsheet instead of another subform?
I hope the information give is helpful in getting me in direction I need to
be in.
Anyones help is greatly appreciated.
Thanks so much in advance.
MainForm = record source "tblProject Staffing Resources".
On the MainForm there are 4 comboxes:
ProjectID = row source "qryProjectID
Discipline Name = row source "qryDisciplineName"
Section Number = row source "qrySectionNumber"
Last Name = row source "qryLastName"
There is also a select button and a clear button. Once a selection is made
from one or a combination of combo boxes the select button is clicked and the
results display in a subform = record source "SELECT [tblProject Staffing
Resources].ProjectID, [tblProject Staffing Resources].DisciplineName,
[tblProject Staffing Resources].SectionNumber, [tblProject Staffing
Resources].LastName, [tblProject Staffing Resources].FirstName, [tblProject
Staffing Resources].[Discipline Lead], [tblProject Staffing Resources].[Est
Project Start Date], [tblProject Staffing Resources].[Est Project End Date],
[tblProject Staffing Resources].EmployeeID ".
What I need to know is how to place the total hours worked for whatever
selection is made in the combo boxes, in a text box on the Main Form. The
hours are located in a table named "tblHours_worked".
Also, on the subform, once a selection is made and the results are displayed
in the subform, I have it so if you double clicked on one of the above fields
(combo boxes) in the subform, two prompt boxes pop up asking for date range.
The problem is if I double click on the LastName on a specific ProjectID, the
records show for that lastname and all the ProjectIDs associated with that
name. How do I just the show the records for that specific record with that
specific ProjectID and not all the Projects.
Below is the code I have:
Private Sub LastName_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = Me.LastName
stDocName = "frmHours_Worked_subform"
DoCmd.OpenForm stDocName, acFormDS, , _
"LastName = """ & stLinkCriteria & """" _
This is assuming the criteria selected in the MainForm Combo box is Last Name.
Then what code do I use for the double click so that the information opens
in a Excel spreadsheet instead of another subform?
I hope the information give is helpful in getting me in direction I need to
be in.
Anyones help is greatly appreciated.
Thanks so much in advance.