From: vanmen on
I've been trying to get dlookup to work without success.

I'm trying to get a title of a class to be inserted depending on the number
of the class.

I tried =DLookup("[Title]","[ Course Listing]",”[Course #])

and I get "invalid syntax" message. Can anyone help? Thanks.
From: Steve on
Assuming the text box is named EnterCourseNum and the field in the table is
named CourseNum, you need:

=DLookup("[Title]","[ Course Listing]","[CourseNum] = " & Me!EnterCourseNum)

Steve
santus(a)penn.com

"vanmen" <vanmen(a)discussions.microsoft.com> wrote in message
news:97E38D20-A117-49F5-A4D6-6D50985C237D(a)microsoft.com...
> I've been trying to get dlookup to work without success.
>
> I'm trying to get a title of a class to be inserted depending on the
> number
> of the class.
>
> I tried =DLookup("[Title]","[ Course Listing]","[Course #])
>
> and I get "invalid syntax" message. Can anyone help? Thanks.


From: Tom van Stiphout on
On Sat, 22 May 2010 16:42:01 -0700, vanmen
<vanmen(a)discussions.microsoft.com> wrote:

DLookup takes two or three strings. Your last one is not terminated.
It should be �[Course #]"
Once you do that, it will still not work. That's because the third
string is supposed to be a where-clause, typically:
fieldname = value
For example:
"[Course #] = " & Me.myCourseNoControl

-Tom.
Microsoft Access MVP


>I've been trying to get dlookup to work without success.
>
>I'm trying to get a title of a class to be inserted depending on the number
>of the class.
>
>I tried =DLookup("[Title]","[ Course Listing]",�[Course #])
>
>and I get "invalid syntax" message. Can anyone help? Thanks.
From: Steve on
That's just what I said four and a half hours ago!

Steve


"Tom van Stiphout" <tom7744.no.spam(a)cox.net> wrote in message
news:mjbhv5dv873p2irnvls7sgog72tkgptnd5(a)4ax.com...
> On Sat, 22 May 2010 16:42:01 -0700, vanmen
> <vanmen(a)discussions.microsoft.com> wrote:
>
> DLookup takes two or three strings. Your last one is not terminated.
> It should be "[Course #]"
> Once you do that, it will still not work. That's because the third
> string is supposed to be a where-clause, typically:
> fieldname = value
> For example:
> "[Course #] = " & Me.myCourseNoControl
>
> -Tom.
> Microsoft Access MVP
>
>
>>I've been trying to get dlookup to work without success.
>>
>>I'm trying to get a title of a class to be inserted depending on the
>>number
>>of the class.
>>
>>I tried =DLookup("[Title]","[ Course Listing]","[Course #])
>>
>>and I get "invalid syntax" message. Can anyone help? Thanks.


From: John... Visio MVP on
You are showing your lack of awareness to the details. You did not submit a
post at 5:30am as you indicate, your post was at 7:52 last night.

Of course, details and facts are not your strong point.

John..
"Steve" <notmyemail(a)address.com> wrote in message
news:OzHVSio%23KHA.5044(a)TK2MSFTNGP04.phx.gbl...
> That's just what I said four and a half hours ago!
>
> Steve
>
>
> "Tom van Stiphout" <tom7744.no.spam(a)cox.net> wrote in message
> news:mjbhv5dv873p2irnvls7sgog72tkgptnd5(a)4ax.com...
>> On Sat, 22 May 2010 16:42:01 -0700, vanmen
>> <vanmen(a)discussions.microsoft.com> wrote:
>>
>> DLookup takes two or three strings. Your last one is not terminated.
>> It should be "[Course #]"
>> Once you do that, it will still not work. That's because the third
>> string is supposed to be a where-clause, typically:
>> fieldname = value
>> For example:
>> "[Course #] = " & Me.myCourseNoControl
>>
>> -Tom.
>> Microsoft Access MVP
>>
>>
>>>I've been trying to get dlookup to work without success.
>>>
>>>I'm trying to get a title of a class to be inserted depending on the
>>>number
>>>of the class.
>>>
>>>I tried =DLookup("[Title]","[ Course Listing]","[Course #])
>>>
>>>and I get "invalid syntax" message. Can anyone help? Thanks.
>
>


 |  Next  |  Last
Pages: 1 2
Prev: report error message
Next: Mensaje