S SetanPutih Registered User. Local time Today, 09:07 Joined Jun 27, 2019 Messages 27 Jul 18, 2019 #21 Thanks for the reply.. I really appreciate it. Just to clarify so its a single quote mark ' rather than a double quote mark " only around the EmployeeID?
Thanks for the reply.. I really appreciate it. Just to clarify so its a single quote mark ' rather than a double quote mark " only around the EmployeeID?
S SetanPutih Registered User. Local time Today, 09:07 Joined Jun 27, 2019 Messages 27 Jul 18, 2019 #22 So the first line would look like.. ? Sorry again. Really new to this. Select Case Me.List2.Value Case "Employee Activity Report" DoCmd.OpenReport reportname:="rptEmpActivity", WhereCondition:=’[EmployeeID]='’& gEmployeeID & ‘", view:=acViewReport Case "Training"
So the first line would look like.. ? Sorry again. Really new to this. Select Case Me.List2.Value Case "Employee Activity Report" DoCmd.OpenReport reportname:="rptEmpActivity", WhereCondition:=’[EmployeeID]='’& gEmployeeID & ‘", view:=acViewReport Case "Training"
Gasman Enthusiastic Amateur Local time Today, 17:07 Joined Sep 21, 2011 Messages 17,077 Jul 18, 2019 #23 No, probably like Code: DoCmd.OpenReport reportname:="rptEmpActivity", WhereCondition:="[EmployeeID]=" & gEmployeeID , view:=acViewReport TBH I have never used keyword parameters, just positional. Code: DoCmd.OpenReport "rptEmpActivity",acViewReport,,"EmployeeID=" & gEmployeeID Intellisense will walk you through each parameter in turn. https://docs.microsoft.com/en-us/office/vba/api/access.docmd.openreport The quotes/or not are around the value of what you are looking for, not the name of the field. HTH
No, probably like Code: DoCmd.OpenReport reportname:="rptEmpActivity", WhereCondition:="[EmployeeID]=" & gEmployeeID , view:=acViewReport TBH I have never used keyword parameters, just positional. Code: DoCmd.OpenReport "rptEmpActivity",acViewReport,,"EmployeeID=" & gEmployeeID Intellisense will walk you through each parameter in turn. https://docs.microsoft.com/en-us/office/vba/api/access.docmd.openreport The quotes/or not are around the value of what you are looking for, not the name of the field. HTH
S SetanPutih Registered User. Local time Today, 09:07 Joined Jun 27, 2019 Messages 27 Jul 19, 2019 #24 it Worked! You legend! If I could buy you a pint I'd buy you two. Thank you
Gasman Enthusiastic Amateur Local time Today, 17:07 Joined Sep 21, 2011 Messages 17,077 Jul 19, 2019 #25 Just glad I got it right.