Adding text boxes from more than one table to a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I want to add a text box showing a date which is stored in a different table
in the personel form. This text box is purely to show the date, how can I do
this please?

Iain
 
Hi Iain,

There's basically two ways to do this, and which one you choose will depend
upon your data and hows it's related.

1. Put the form's current recordsource (table or query) into a new query,
and include the other table. Link appropriately, add the fields you require
to the query's output, and use te new query as the recordsource for your
form.

2. Use a dLookup expression to retrieve the data from the other table. Set
the datasource for your textbox to something like:
=dLookup("NameOfDateField","NameOfTable","Criteria expression")
See Help on domain aggregate functions for more detail if you're not
familiar with this.

HTH,

Rob
 
If the date is always the same, regardless of the current record, you can use
a DLookup as the Control Source of the text box; otherwise, use the Form
Current event to populate the text box based on the current record.
 
Back
Top