A
accessuser via AccessMonster.com
My primary key for the main form is "EmpID" which links to the subform. The
subform has "CourseID", and some other information. The form will show each
employee with all of their courses information in the subform. I have a
command button called "Detail" next to the courseID. I want users to be able
to click on the "Detail" and open up a new form with the Cost Information for
that one particular CourseID information. the following is the code I got
from other site, but dont know what they mean. It does help me open up the
form but not finding the match cost for the courseID
Private Sub cmdDetails_Click()
Dim frm As Form
If Not IsNull(Me!CourseID) Then
gstrWherebook = "[CourseID] = """ & Me!CourseID & """"
DoCmd.OpenForm FormName:="frmCost", WhereCondition:=gstrWherebook
Set frm = Forms!FrmCost
End If
End Sub
What is "gstrWherebook" and "WhereCondition=gstrWherebook mean? What should
I replace that for my database?
Thank you very much!!!
subform has "CourseID", and some other information. The form will show each
employee with all of their courses information in the subform. I have a
command button called "Detail" next to the courseID. I want users to be able
to click on the "Detail" and open up a new form with the Cost Information for
that one particular CourseID information. the following is the code I got
from other site, but dont know what they mean. It does help me open up the
form but not finding the match cost for the courseID
Private Sub cmdDetails_Click()
Dim frm As Form
If Not IsNull(Me!CourseID) Then
gstrWherebook = "[CourseID] = """ & Me!CourseID & """"
DoCmd.OpenForm FormName:="frmCost", WhereCondition:=gstrWherebook
Set frm = Forms!FrmCost
End If
End Sub
What is "gstrWherebook" and "WhereCondition=gstrWherebook mean? What should
I replace that for my database?
Thank you very much!!!