Hi,
I created a module called VP, this module assigns a person's name to specific cost center. I created a query, with an expression of VP in the field name.
For example:
Cost center: 32076 (Paul O'Neil)
32077 (Paul O'Neil)
33001 (Bill Gates), so if I put Cost center 32076 in any form Paul O'Neal's name will be shown.
My question is as follow:
I am creating a form to view a report. In this form I have a combo box, text box and a preview report button.
In the preview report button I have a coding of:
Private Sub Command37_Click()
On Error GoTo Err_Command37_Click
Dim stDocName As String
Dim strCrit As String
stDocName = "Consultant Report"
strCrit = "[VP] = '" & Me.Text2 & "'"
DoCmd.OpenReport stDocName, acViewPreview, , strCrit
Exit_Command37_Click:
Exit Sub
The problem is that my combo box is showing a list of the name based on each cost center, for example, Paul O'Neal, Paul O'Neil, Paul O'Neil, Bill Gates, etc. I just want to see a list of name. For example, Paul O'Neil, Bill Gates, etc.
Please Help
I created a module called VP, this module assigns a person's name to specific cost center. I created a query, with an expression of VP in the field name.
For example:
Cost center: 32076 (Paul O'Neil)
32077 (Paul O'Neil)
33001 (Bill Gates), so if I put Cost center 32076 in any form Paul O'Neal's name will be shown.
My question is as follow:
I am creating a form to view a report. In this form I have a combo box, text box and a preview report button.
In the preview report button I have a coding of:
Private Sub Command37_Click()
On Error GoTo Err_Command37_Click
Dim stDocName As String
Dim strCrit As String
stDocName = "Consultant Report"
strCrit = "[VP] = '" & Me.Text2 & "'"
DoCmd.OpenReport stDocName, acViewPreview, , strCrit
Exit_Command37_Click:
Exit Sub
The problem is that my combo box is showing a list of the name based on each cost center, for example, Paul O'Neal, Paul O'Neil, Paul O'Neil, Bill Gates, etc. I just want to see a list of name. For example, Paul O'Neil, Bill Gates, etc.
Please Help