Prev: report error message
Next: Mensaje
From: vanmen on 22 May 2010 19:42 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 22 May 2010 19:52 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 23 May 2010 00:28 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 23 May 2010 10:59 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 23 May 2010 11:39
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. > > |