Link to home
Start Free TrialLog in
Avatar of SparkyP
SparkyP

asked on

& Chr(34) syntax

On a similar line to my previous post. The following code works fine except for our Mr D'Arcy.

I have tried numerous permitations, but cnnot escape an errror message.

Please can you help?

Private Sub Form_Open(Cancel As Integer)
Me.Filter = "[Engname] =" & Chr(34) & Forms!frmdatabaselogin!cboStaffMember & Chr(34) & "And [WE Date] >= Now() - 3"
Me.FilterOn = True

Me.WRSSub.Form.Combo65.RowSource = "select [hours id], [id2], [job number id], [Job Date], site, [Work Request Details], [total ot hrs], [total std hrs], callout from vvworksheetlookup where EngName='" & Forms!frmdatabaselogin!cboStaffMember & "'"
End Sub
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Try this:


Me.WRSSub.Form.Combo65.RowSource = "select [hours id], [id2], [job number id], [Job Date], site, [Work Request Details], [total ot hrs], [total std hrs], callout from vvworksheetlookup where EngName=" chr(34) & Forms!frmdatabaselogin!cboStaffMember & CHR(34

Open in new window

Avatar of SparkyP
SparkyP

ASKER

mbizup

Your code finished at the final CHR(34

I've tried ) and ) &, but keep getting expected end of statement error at the first CHR
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SparkyP

ASKER

Thank you so much