Display Field

G

Guest

Hi

In my client table i have a field called suburb. This field looks up the
suburb table to get its values. In the Suburb table i have a suburb field
and Post code fields.

I have based a form on a clients query, and it shows the suburb and all
information as needed. What i need to show is a postcode on the form. How
can i get it to lookup up the suburb in its own table and return the postcode
relating to that area.

If i add the suburb table to the query and add the postcode field to the
query, it stops me from updating any records. The postcode is purely for
display view only.

Thanks for your help
 
G

Guest

With the use of DlookUp

In the ControlSource of the text box where you want to display the postcode
you can write

=Dlookup("[postcode]","[suburb],"[suburbFieldNameInTheTable]=" &
[suburbTextBoxNameIntheform] )

If the suburb is a text field type, then you need to add single quote to the
value
=Dlookup("[postcode]","[suburb],"[suburbFieldNameInTheTable]='" &
[suburbTextBoxNameIntheform] & "'" )

Note: make sure the fields and table name are correct
 

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

Top