Apr 22, 2003 #1 Tom123456 Programmer Joined Apr 2, 2003 Messages 70 Location SE Hello How do I get a value from another table. Example if I have a table mapped to a form then I can just write: Dim test = [column] But if the column is in another table, how do I do?, or can I mapped more than one table to one form?? - Tom
Hello How do I get a value from another table. Example if I have a table mapped to a form then I can just write: Dim test = [column] But if the column is in another table, how do I do?, or can I mapped more than one table to one form?? - Tom
Apr 22, 2003 1 #2 Norris68 IS-IT--Management Joined Jun 19, 2002 Messages 769 Location GB If you want to pull a value from another form you can use: Code: MyValue = Forms("FormName").FieldName If you want to pull a value from a table, use the DLookup function: Code: MyValue = DLookup("FieldName","TableName","FieldValue=" & ValueToLookUp) (Third parameter is optional and allows you to specify the criteria - like a WHERE clause without the keyword) Upvote 0 Downvote
If you want to pull a value from another form you can use: Code: MyValue = Forms("FormName").FieldName If you want to pull a value from a table, use the DLookup function: Code: MyValue = DLookup("FieldName","TableName","FieldValue=" & ValueToLookUp) (Third parameter is optional and allows you to specify the criteria - like a WHERE clause without the keyword)
Apr 22, 2003 Thread starter #3 Tom123456 Programmer Joined Apr 2, 2003 Messages 70 Location SE Thanks Norris68!!!!! I have tried to solve this for days... - Tom Upvote 0 Downvote