Hi
Terribly sorry but got another DLookup syntax problem. When I get solutions I record them and can usually recreate but this one is for a text criterion and also a numeric criterion which I don't seem to have had to do before.
What I have is
The format of the result from Me.cboStaff is like E0915 and from Me.cboWeekNo is 3
In the respective fields in the table dbo_tsin strEmp is a text field and lngWeek in a long integer.
I am pretty sure I have got the inverted commas right. Tried loads of combinations and this one went through without going into red so assumed (wrong again) it was OK.
Can any of you wizards help me out please?
Thanks in anticipation
Best wishes
Terribly sorry but got another DLookup syntax problem. When I get solutions I record them and can usually recreate but this one is for a text criterion and also a numeric criterion which I don't seem to have had to do before.
What I have is
Code:
varRegister = DLookup("lngTsin", "dbo_tsin", "strEmp = " & Me.cboStaff & " And lngWeek =" & Me.cboWeekNo)
In the respective fields in the table dbo_tsin strEmp is a text field and lngWeek in a long integer.
I am pretty sure I have got the inverted commas right. Tried loads of combinations and this one went through without going into red so assumed (wrong again) it was OK.
Can any of you wizards help me out please?
Thanks in anticipation
Best wishes