dlookup

A

ani

i have a table which has fields eqno(text field), eq desc(text field),
eqnum(primary key)
on a datasheet subform i want the eqno field values display for all records.

i tried the below dlookups at the text record source which gave me an error.
=DLookUp("[EQPTNO]"," SupportEquipment ","[Text29]=[eqptnum]")
=DLookUp("[EQPTNO]"," [SupportEquipment] ","[Text29]=[eqptnum]")

where text29 is the text field on the subform which stores the eqnum(primary
key)

plese advise what is wrong
 
T

Tom Lake

ani said:
i have a table which has fields eqno(text field), eq desc(text field),
eqnum(primary key)
on a datasheet subform i want the eqno field values display for all records.

i tried the below dlookups at the text record source which gave me an error.
=DLookUp("[EQPTNO]"," SupportEquipment ","[Text29]=[eqptnum]")
=DLookUp("[EQPTNO]"," [SupportEquipment] ","[Text29]=[eqptnum]")

where text29 is the text field on the subform which stores the eqnum(primary
key)

The first parameter tells which field will be returned. Your DLOOKUP will show
EQPTNO
Is that what you want? Also you say the key is eqnum but you're testing a
field called EQPTNO
You need to test the actual key field name

=DLookUp("[EQNO]"," SupportEquipment ","[eqnum]= '" & [Text29] & "'")

To display the description for a given key do this:

=DLookUp("[EQ DESC]"," SupportEquipment ","[eqnum]= '" & [Text29] & "'")

Tom Lake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top