Dlookup helo..

  • Thread starter Tanya via AccessMonster.com
  • Start date
T

Tanya via AccessMonster.com

Hi,

hopefully an easy one for someone.

i have a table which contains a label name and i want the form to vary.

i have everything i need except for this last bit

In the Where Criteria belwo J1 is datatype text and i'm not sure on the
correct syntax

Me.LJ1.Caption = DLookup("[SheetDesc]", "tblQuality_SheetCodes", "[SheetCode]
= J1")

thanks for your help
Tanya
 
J

John Vinson

In the Where Criteria belwo J1 is datatype text and i'm not sure on the
correct syntax

Me.LJ1.Caption = DLookup("[SheetDesc]", "tblQuality_SheetCodes", "[SheetCode]
= J1")

Put quotes around the criterion:

Me.LJ1.Caption = DLookup("[SheetDesc]", "tblQuality_SheetCodes",
"[SheetCode] = 'J1'")


John W. Vinson[MVP]
 
T

Tanya via AccessMonster.com

thank you very much John..
something so simple i feel a bit silly



John said:
In the Where Criteria belwo J1 is datatype text and i'm not sure on the
correct syntax

Me.LJ1.Caption = DLookup("[SheetDesc]", "tblQuality_SheetCodes", "[SheetCode]
= J1")

Put quotes around the criterion:

Me.LJ1.Caption = DLookup("[SheetDesc]", "tblQuality_SheetCodes",
"[SheetCode] = 'J1'")

John W. Vinson[MVP]
 
Top